* added new conf option: SkipAddonChat=1 to drop any chat messages sent by player's addons

This commit is contained in:
false_genesis 2008-01-24 21:33:08 +00:00
parent 94c4994a12
commit 8460ff2c40
4 changed files with 14 additions and 0 deletions

View File

@ -113,5 +113,9 @@ rmcontrolhost=localhost
// PseuWoW will need more memory with maps enabled! // PseuWoW will need more memory with maps enabled!
useMaps=0 useMaps=0
// Addon language is usually not shown by client
// Since addons are far from beeing used in PseuWoW, we can completely ignore addon chat messages.
// Sometimes they even cause problems, like make the console window beep...
SkipAddonChat=1

View File

@ -413,6 +413,7 @@ void PseuInstanceConf::ApplyFromVarSet(VarSet &v)
rmcontrolport=atoi(v.Get("RMCONTROLPORT").c_str()); rmcontrolport=atoi(v.Get("RMCONTROLPORT").c_str());
rmcontrolhost=v.Get("RMCONTROLHOST"); rmcontrolhost=v.Get("RMCONTROLHOST");
useMaps=(bool)atoi(v.Get("USEMAPS").c_str()); useMaps=(bool)atoi(v.Get("USEMAPS").c_str());
useMaps=(bool)atoi(v.Get("SKIPADDONCHAT").c_str());
// clientversion is a bit more complicated to add // clientversion is a bit more complicated to add
{ {

View File

@ -54,6 +54,7 @@ class PseuInstanceConf
uint32 rmcontrolport; uint32 rmcontrolport;
std::string rmcontrolhost; std::string rmcontrolhost;
bool useMaps; bool useMaps;
bool skipaddonchat;
// gui related // gui related
bool enablegui; bool enablegui;

View File

@ -538,6 +538,10 @@ void WorldSession::_HandleMessageChatOpcode(WorldPacket& recvPacket)
bool isCmd=false; bool isCmd=false;
recvPacket >> type >> lang; recvPacket >> type >> lang;
if(lang == LANG_ADDON && GetInstance()->GetConf()->skipaddonchat)
return;
recvPacket >> source_guid >> unk; // added in 2.1.0 recvPacket >> source_guid >> unk; // added in 2.1.0
if (type == CHAT_MSG_CHANNEL) if (type == CHAT_MSG_CHANNEL)
{ {
@ -693,6 +697,10 @@ void WorldSession::_HandleMessageChatOpcode(WorldPacket& recvPacket)
if(objmgr.GetItemProto(id)==NULL) if(objmgr.GetItemProto(id)==NULL)
SendQueryItem(id,0); SendQueryItem(id,0);
} }
else
{
logdebug("Tried to find ItemID in chat message, but link seems incorrect");
}
} }
} }
} }