Core/Chat: Disallow hyperlinks from being inserted in various guild-related freetext fields (the client already blocks this)
Port From (https://github.com/TrinityCore/TrinityCore/commit/ee5c0e5372308f4a6e52b14a14f5ee6a683b58dc)
This commit is contained in:
@@ -588,6 +588,19 @@ namespace Game
|
||||
return m_muteTime <= GameTime.GetGameTime();
|
||||
}
|
||||
|
||||
public bool DisallowHyperlinksAndMaybeKick(string str)
|
||||
{
|
||||
if (!str.Contains('|'))
|
||||
return true;
|
||||
|
||||
Log.outError(LogFilter.Network, $"Player {GetPlayer().GetName()} ({GetPlayer().GetGUID()}) sent a message which illegally contained a hyperlink:\n{str}");
|
||||
|
||||
if (WorldConfig.GetIntValue(WorldCfg.ChatStrictLinkCheckingKick) != 0)
|
||||
KickPlayer();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SendNotification(CypherStrings str, params object[] args)
|
||||
{
|
||||
SendNotification(Global.ObjectMgr.GetCypherString(str), args);
|
||||
|
||||
Reference in New Issue
Block a user