From 1417c14821024bde33552573665973165613fa2a Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 27 Jan 2014 05:01:34 +0100 Subject: add window closing for queries --- bouncer/ircserver.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bouncer/ircserver.cpp') diff --git a/bouncer/ircserver.cpp b/bouncer/ircserver.cpp index 818478f..63d5c90 100644 --- a/bouncer/ircserver.cpp +++ b/bouncer/ircserver.cpp @@ -72,6 +72,16 @@ Query *IRCServer::findQuery(const char *name, bool createIfNeeded) { } } +void IRCServer::deleteQuery(Query *query) { + auto i = queries.find(query->partner); + if (i != queries.end()) { + bouncer->deregisterWindow(query); + + queries.erase(i); + delete query; + } +} + void IRCServer::connectedEvent() { -- cgit v1.2.3