* added new conf option: SkipAddonChat=1 to drop any chat messages sent by player's addons
This commit is contained in:
parent
94c4994a12
commit
8460ff2c40
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user