[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:
Vayle
2023-02-06 18:22:12 -05:00
committed by GitHub
parent 6a9228ed6e
commit b385a4385f
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -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;
}
+4 -2
View File
@@ -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");