|
Архив - только для чтения |
Модератор форума: andycrowz |
Форум Корзина форума Корзина Server info (Патч Server info) |
Server info |
Данный патч разработан для того чтобы при написании команды .server info выводилась не только инфа о реве, но и сообщение дня, функция имеет отключение в конфиге сервера, немного переделал, так сказать добавил отсебятины.
[cut]diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index 7476519..8737a8e 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -91,16 +91,19 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/) uint32 maxQueuedClientsNum = sWorld.GetMaxQueuedSessionCount(); std::string str = secsToTimeString(sWorld.GetUptime()); - char const* full; - if(m_session) - full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,"|cffffffff|Hurl:" REVISION_ID "|h" REVISION_ID "|h|r"); - else - full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID); - - SendSysMessage(full); - PSendSysMessage(LANG_USING_SCRIPT_LIB,sWorld.GetScriptsVersion()); - PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion()); - PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion()); + if(sWorld.getConfig(CONFIG_BOOL_SERVER_INFO)) + { + char const* full; + if(m_session) + full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,"|cffffffff|Hurl:" REVISION_ID "|h" REVISION_ID "|h|r"); + else + full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID); + + SendSysMessage(full); + PSendSysMessage(LANG_USING_SCRIPT_LIB,sWorld.GetScriptsVersion()); + PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion()); + PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion()); + PSendSysMessage(LANG_USING_MOTD,sConfig.GetStringDefault("Motd", "Welcome to the Massive Network Game Object Server." ) ); + } PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum); PSendSysMessage(LANG_UPTIME, str.c_str()); diff --git a/src/game/World.cpp b/src/game/World.cpp index ada384d..8821b54 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -514,6 +514,7 @@ void World::LoadConfigSettings(bool reload) setConfigPos(CONFIG_FLOAT_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS, "CreatureFamilyFleeAssistanceRadius", 30.0f); ///- Read other configuration items from the config file + setConfig(CONFIG_BOOL_SERVER_INFO, "ServerInfo", true); setConfigMinMax(CONFIG_UINT32_COMPRESSION, "Compression", 1, 1, 9); setConfig(CONFIG_BOOL_ADDON_CHANNEL, "AddonChannel", true); setConfig(CONFIG_BOOL_GRID_UNLOAD, "GridUnload", true); diff --git a/src/game/World.h b/src/game/World.h index 72642d3..34027b0 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -292,6 +292,7 @@ enum eConfigBoolValues CONFIG_BOOL_DEATH_CORPSE_RECLAIM_DELAY_PVP, CONFIG_BOOL_DEATH_CORPSE_RECLAIM_DELAY_PVE, CONFIG_BOOL_DEATH_BONES_WORLD, + CONFIG_BOOL_SERVER_INFO, CONFIG_BOOL_DEATH_BONES_BG_OR_ARENA, CONFIG_BOOL_ALL_TAXI_PATHS, CONFIG_BOOL_DECLINED_NAMES_USED, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 43e4159..dcbe5c4 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -632,6 +632,11 @@ LogColors = "" # Motd # Message of the Day. Displayed at worldlogin for every user ('@' for a newline). # +# ServerInfo +# Enable or disable show server version (.server info) +# Default: 1 - on (show full information about server version, uptime and online) +# 0 - off (show current and max online and uptime only) +# ################################################################################################################### GameType = 1 @@ -691,6 +696,7 @@ ClientCacheVersion = 0 Event.Announce = 0 BeepAtStart = 1 Motd = "Welcome to the Massive Network Game Object Server." +ServerInfo = 1 ################################################################################################################### # PLAYER INTERACTION -- 1.6.3.2.1299.gee46c[/cut] Не уверен скомпилируется ли. |
Данная тема была перемещена из раздела Патчи в ядро MaNGOS.
Причина перемещения: устарело Переместил: ph3n.
Сообщение # 5 написано 14.10.2012 в 13:47
|
| |||
| |||