diff --git a/common/ruletypes.h b/common/ruletypes.h index 9283142da..8ee53cc5a 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -623,6 +623,7 @@ RULE_BOOL(Chat, EnableVoiceMacros, true, "Enable voice macros") RULE_BOOL(Chat, EnableMailKeyIPVerification, true, "Setting whether the authenticity of the client should be verified via its IP address when accessing the InGame mailbox") RULE_BOOL(Chat, EnableAntiSpam, true, "Enable anti-spam system for chat") RULE_BOOL(Chat, SuppressCommandErrors, false, "Do not suppress command errors by default") +RULE_BOOL(Chat, ChannelsIgnoreNameFilter, false, "Ignore name filtering when creating new chat channels") RULE_INT(Chat, MaxPermanentPlayerChannels, 0, "Maximum number of permanent chat channels a player can make. Default 0.") RULE_INT(Chat, MinStatusToBypassAntiSpam, 100, "Minimum status to bypass the anti-spam system") RULE_INT(Chat, MinimumMessagesPerInterval, 4, "Minimum number of chat messages allowed per interval. The karma value is added to this value") diff --git a/ucs/chatchannel.cpp b/ucs/chatchannel.cpp index 20e0e0603..7dd86a38a 100644 --- a/ucs/chatchannel.cpp +++ b/ucs/chatchannel.cpp @@ -78,7 +78,7 @@ ChatChannel *ChatChannelList::CreateChannel( { uint8 max_perm_player_channels = RuleI(Chat, MaxPermanentPlayerChannels); - if (!database.CheckChannelNameFilter(name)) { + if (!RuleB(Chat, ChannelsIgnoreNameFilter) && !database.CheckChannelNameFilter(name)) { if (!(owner == SYSTEM_OWNER)) { return nullptr; } diff --git a/ucs/database.cpp b/ucs/database.cpp index 4c4e6dfbe..0adc03a30 100644 --- a/ucs/database.cpp +++ b/ucs/database.cpp @@ -224,8 +224,10 @@ bool UCSDatabase::GetVariable(const char *varname, char *varvalue, uint16 varval bool UCSDatabase::LoadChatChannels() -{ - LoadFilteredNamesFromDB(); +{ + if (!RuleB(Chat, ChannelsIgnoreNameFilter)) { + LoadFilteredNamesFromDB(); + } LoadReservedNamesFromDB(); LogInfo("Loading chat channels from the database");