mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-26 15:11:30 +00:00
Updated profanity manager to only redact in 'public' channels
This commit is contained in:
parent
b810e3aa71
commit
e908958eb8
@ -1,6 +1,9 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
|
||||
== 2/5/2019 ==
|
||||
Uleat: Updated profanity manager to only redact in 'public' channels
|
||||
|
||||
== 2/4/2019 ==
|
||||
Uleat: Added command 'profanity' (aliased 'prof')
|
||||
- This is a server-based tool for redacting any language that an admin deems as profanity (socially unacceptable within their community)
|
||||
|
||||
@ -896,10 +896,6 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
language = 0; // No need for language when drunk
|
||||
}
|
||||
|
||||
// Censor the message
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive() && (chan_num != 8))
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
switch(chan_num)
|
||||
{
|
||||
case 0: { /* Guild Chat */
|
||||
@ -936,6 +932,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
if (GetPet() && GetTarget() == GetPet() && GetPet()->FindType(SE_VoiceGraft))
|
||||
sender = GetPet();
|
||||
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
entity_list.ChannelMessage(sender, chan_num, language, lang_skill, message);
|
||||
break;
|
||||
}
|
||||
@ -965,16 +964,22 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
}
|
||||
}
|
||||
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
if (!worldserver.SendChannelMessage(this, 0, 4, 0, language, message))
|
||||
Message(0, "Error: World server disconnected");
|
||||
Message(0, "Error: World server disconnected");
|
||||
}
|
||||
else if(!RuleB(Chat, ServerWideAuction)) {
|
||||
Mob *sender = this;
|
||||
|
||||
if (GetPet() && GetTarget() == GetPet() && GetPet()->FindType(SE_VoiceGraft))
|
||||
sender = GetPet();
|
||||
sender = GetPet();
|
||||
|
||||
entity_list.ChannelMessage(sender, chan_num, language, message);
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
entity_list.ChannelMessage(sender, chan_num, language, message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1009,6 +1014,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
}
|
||||
}
|
||||
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
if (!worldserver.SendChannelMessage(this, 0, 5, 0, language, message))
|
||||
{
|
||||
Message(0, "Error: World server disconnected");
|
||||
@ -1021,12 +1029,16 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
if (GetPet() && GetTarget() == GetPet() && GetPet()->FindType(SE_VoiceGraft))
|
||||
sender = GetPet();
|
||||
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
entity_list.ChannelMessage(sender, chan_num, language, message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 6: /* Broadcast */
|
||||
case 11: { /* GM Say */
|
||||
// gms/admins should have enough tact to not abuse their own servers...
|
||||
if (!(admin >= 80))
|
||||
Message(0, "Error: Only GMs can use this channel");
|
||||
else if (!worldserver.SendChannelMessage(this, targetname, chan_num, 0, language, message))
|
||||
@ -1159,6 +1171,11 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
}
|
||||
case 20:
|
||||
{
|
||||
// need to activate ucs filter for non-private channels - do not redact here
|
||||
|
||||
//if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
// EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
// UCS Relay for Underfoot and later.
|
||||
if(!worldserver.SendChannelMessage(this, 0, chan_num, 0, language, message))
|
||||
Message(0, "Error: World server disconnected");
|
||||
@ -1173,6 +1190,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
if (msg_len > 512)
|
||||
message[512] = '\0';
|
||||
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_Emote, 4 + msg_len + strlen(GetName()) + 2);
|
||||
Emote_Struct* es = (Emote_Struct*)outapp->pBuffer;
|
||||
char *Buffer = (char *)es;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user