diff options
author | Treeki <treeki@gmail.com> | 2014-01-27 05:01:34 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2014-01-27 05:01:34 +0100 |
commit | 1417c14821024bde33552573665973165613fa2a (patch) | |
tree | d4ccf63d1f2812813a6fe9119be5230470f5fc9b /bouncer/ircserver.cpp | |
parent | 6248214f5aa6c6f73c248f4239c66fef01cbbbfa (diff) | |
download | bounce4-1417c14821024bde33552573665973165613fa2a.tar.gz bounce4-1417c14821024bde33552573665973165613fa2a.zip |
add window closing for queries
Diffstat (limited to '')
-rw-r--r-- | bouncer/ircserver.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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() { |