* Do not print chat logs to console. It will simply screw up console output.
* Fix a possible crash in if/else checks in channel chat logging. --HG-- branch : trunk
This commit is contained in:
@@ -503,12 +503,17 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||||||
chn->HasFlag(CHANNEL_FLAG_GENERAL) ||
|
chn->HasFlag(CHANNEL_FLAG_GENERAL) ||
|
||||||
chn->HasFlag(CHANNEL_FLAG_CITY) ||
|
chn->HasFlag(CHANNEL_FLAG_CITY) ||
|
||||||
chn->HasFlag(CHANNEL_FLAG_LFG))
|
chn->HasFlag(CHANNEL_FLAG_LFG))
|
||||||
|
{
|
||||||
if(sWorld.getConfig(CONFIG_CHATLOG_SYSCHAN))
|
if(sWorld.getConfig(CONFIG_CHATLOG_SYSCHAN))
|
||||||
sLog.outChat("[SYSCHAN] Player %s tells channel %s: %s",
|
sLog.outChat("[SYSCHAN] Player %s tells channel %s: %s",
|
||||||
GetPlayer()->GetName(), chn->GetName().c_str(), msg.c_str());
|
GetPlayer()->GetName(), chn->GetName().c_str(), msg.c_str());
|
||||||
else if(sWorld.getConfig(CONFIG_CHATLOG_CHANNEL))
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(sWorld.getConfig(CONFIG_CHATLOG_CHANNEL))
|
||||||
sLog.outChat("[CHANNEL] Player %s tells channel %s: %s",
|
sLog.outChat("[CHANNEL] Player %s tells channel %s: %s",
|
||||||
GetPlayer()->GetName(), chn->GetName().c_str(), msg.c_str());
|
GetPlayer()->GetName(), chn->GetName().c_str(), msg.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|||||||
+1
-1
@@ -837,7 +837,7 @@ void Log::outChat( const char * str, ... )
|
|||||||
outTimestamp(chatLogfile);
|
outTimestamp(chatLogfile);
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, str);
|
va_start(ap, str);
|
||||||
vfprintf(chatLogfile, str, ap);
|
fprintf(chatLogfile, str, ap);
|
||||||
fprintf(chatLogfile, "\n" );
|
fprintf(chatLogfile, "\n" );
|
||||||
fflush(chatLogfile);
|
fflush(chatLogfile);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|||||||
Reference in New Issue
Block a user