* 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!
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());
rmcontrolhost=v.Get("RMCONTROLHOST");
useMaps=(bool)atoi(v.Get("USEMAPS").c_str());
useMaps=(bool)atoi(v.Get("SKIPADDONCHAT").c_str());
// clientversion is a bit more complicated to add
{

View File

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

View File

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