bugfix to close irc client down quickly when exiting application.

This commit is contained in:
Mark Vejvoda
2013-05-03 23:11:57 +00:00
parent 1b344808ff
commit 5370729ce1
4 changed files with 64 additions and 1 deletions

View File

@@ -473,6 +473,22 @@ IRCThread::IRCThread(const std::vector<string> &argv, IRCCallbackInterface *call
playerName = "";
}
void IRCThread::disconnect() {
#if !defined(DISABLE_IRCCLIENT)
if(ircSession != NULL) {
setCallbackObj(NULL);
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Quitting Channel\n");
irc_disconnect(ircSession);
BaseThread::signalQuit();
hasJoinedChannel = false;
}
#else
BaseThread::signalQuit();
#endif
}
void IRCThread::signalQuit() {
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: signalQuit [%p]\n",ircSession);