Core/Chat: Configure automatic owner declaration for custom chat channels (patch by leak)
Closes issue 4974. --HG-- branch : trunk
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
#include "WeatherMgr.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "SmartAI.h"
|
||||
#include "Channel.h"
|
||||
|
||||
volatile bool World::m_stopEvent = false;
|
||||
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
|
||||
@@ -576,6 +577,8 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_AUCTION_LEVEL_REQ] = sConfig.GetIntDefault("LevelReq.Auction", 1);
|
||||
m_int_configs[CONFIG_MAIL_LEVEL_REQ] = sConfig.GetIntDefault("LevelReq.Mail", 1);
|
||||
m_bool_configs[CONFIG_ALLOW_PLAYER_COMMANDS] = sConfig.GetBoolDefault("AllowPlayerCommands", 1);
|
||||
m_bool_configs[CONFIG_PRESERVE_CUSTOM_CHANNELS] = sConfig.GetBoolDefault("PreserveCustomChannels", false);
|
||||
m_int_configs[CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION] = sConfig.GetIntDefault("PreserveCustomChannelDuration", 14);
|
||||
m_bool_configs[CONFIG_GRID_UNLOAD] = sConfig.GetBoolDefault("GridUnload", true);
|
||||
m_int_configs[CONFIG_INTERVAL_SAVE] = sConfig.GetIntDefault("PlayerSaveInterval", 15 * MINUTE * IN_MILLISECONDS);
|
||||
m_int_configs[CONFIG_INTERVAL_DISCONNECT_TOLERANCE] = sConfig.GetIntDefault("DisconnectToleranceInterval", 0);
|
||||
@@ -1673,6 +1676,9 @@ void World::SetInitialWorldSettings()
|
||||
// Delete all characters which have been deleted X days before
|
||||
Player::DeleteOldCharacters();
|
||||
|
||||
// Delete all custom channels which haven't been used for PreserveCustomChannelDuration days.
|
||||
Channel::CleanOldChannelsInDB();
|
||||
|
||||
sLog.outString("Starting Arena Season...");
|
||||
sGameEventMgr.StartArenaSeason();
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_AUTOBROADCAST,
|
||||
CONFIG_ALLOW_TICKETS,
|
||||
CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES,
|
||||
CONFIG_PRESERVE_CUSTOM_CHANNELS,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
@@ -308,6 +309,7 @@ enum WorldIntConfigs
|
||||
CONFIG_AUTOBROADCAST_INTERVAL,
|
||||
CONFIG_MAX_RESULTS_LOOKUP_COMMANDS,
|
||||
CONFIG_DB_PING_INTERVAL,
|
||||
CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION,
|
||||
INT_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user