mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-03 10:33:52 +00:00
[Rules] Add rule to ignore name filter on chat channel creation. (#2820)
* [Rules] Add rule to ignore name filter on chat channel creation. * Conditional reorder
This commit is contained in:
parent
6a9228ed6e
commit
b385a4385f
@ -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")
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user