- try to fix irc thread crash and add more verbose output

This commit is contained in:
SoftCoder 2016-01-18 11:49:11 -08:00
parent eeb9fc9405
commit c6c9eb1c02
1 changed files with 9 additions and 0 deletions

View File

@ -86,10 +86,19 @@ void dump_event (irc_session_t * session, const char * event, const char * origi
IRCThread *ctx = (IRCThread *)irc_get_ctx(session);
if(ctx != NULL) {
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
if(ctx->getQuitStatus()) {
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
return;
}
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
if(difftime(time(NULL),ctx->getLastNickListUpdate()) >= 7) {
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
ctx->setLastNickListUpdate(time(NULL));
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
ctx->GetIRCConnectedNickList(ctx->getChannel(),false);
}
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
}
}