mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Added command 'profanity'
This commit is contained in:
@@ -38,6 +38,7 @@ extern volatile bool RunLoops;
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/profanity_manager.h"
|
||||
#include "data_bucket.h"
|
||||
#include "position.h"
|
||||
#include "net.h"
|
||||
@@ -895,6 +896,10 @@ 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 */
|
||||
@@ -1092,6 +1097,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
break;
|
||||
}
|
||||
|
||||
if (EQEmu::ProfanityManager::IsCensorshipActive())
|
||||
EQEmu::ProfanityManager::RedactMessage(message);
|
||||
|
||||
#ifdef BOTS
|
||||
if (message[0] == BOT_COMMAND_CHAR) {
|
||||
if (bot_command_dispatch(this, message) == -2) {
|
||||
|
||||
Reference in New Issue
Block a user