TrinityCore
Loading...
Searching...
No Matches
cs_server.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19Name: server_commandscript
20%Complete: 100
21Comment: All server related commands
22Category: commandscripts
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "Chat.h"
27#include "Config.h"
28#include "DatabaseEnv.h"
29#include "DatabaseLoader.h"
30#include "GameTime.h"
31#include "GitRevision.h"
32#include "Language.h"
33#include "Log.h"
34#include "MySQLThreading.h"
35#include "ObjectAccessor.h"
36#include "Player.h"
37#include "RBAC.h"
38#include "Realm.h"
39#include "UpdateTime.h"
40#include "Util.h"
41#include "VMapFactory.h"
42#include "VMapManager2.h"
43#include "World.h"
44#include "WorldSession.h"
45#include <boost/filesystem/directory.hpp>
46#include <boost/filesystem/operations.hpp>
47#include <openssl/crypto.h>
48#include <openssl/opensslv.h>
49#include <numeric>
50
51#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
52#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
53#endif
54
56{
57public:
58 server_commandscript() : CommandScript("server_commandscript") { }
59
60 std::vector<ChatCommand> GetCommands() const override
61 {
62 static std::vector<ChatCommand> serverIdleRestartCommandTable =
63 {
66 };
67
68 static std::vector<ChatCommand> serverIdleShutdownCommandTable =
69 {
72 };
73
74 static std::vector<ChatCommand> serverRestartCommandTable =
75 {
79 };
80
81 static std::vector<ChatCommand> serverShutdownCommandTable =
82 {
86 };
87
88 static std::vector<ChatCommand> serverSetCommandTable =
89 {
93 };
94
95 static std::vector<ChatCommand> serverCommandTable =
96 {
100 { "idlerestart", rbac::RBAC_PERM_COMMAND_SERVER_IDLERESTART, true, nullptr, "", serverIdleRestartCommandTable },
101 { "idleshutdown", rbac::RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN, true, nullptr, "", serverIdleShutdownCommandTable },
105 { "restart", rbac::RBAC_PERM_COMMAND_SERVER_RESTART, true, nullptr, "", serverRestartCommandTable },
106 { "shutdown", rbac::RBAC_PERM_COMMAND_SERVER_SHUTDOWN, true, nullptr, "", serverShutdownCommandTable },
107 { "set", rbac::RBAC_PERM_COMMAND_SERVER_SET, true, nullptr, "", serverSetCommandTable },
108 };
109
110 static std::vector<ChatCommand> commandTable =
111 {
112 { "server", rbac::RBAC_PERM_COMMAND_SERVER, true, nullptr, "", serverCommandTable },
113 };
114 return commandTable;
115 }
116
117 // Triggering corpses expire check in world
118 static bool HandleServerCorpsesCommand(ChatHandler* /*handler*/, char const* /*args*/)
119 {
120 sWorld->RemoveOldCorpses();
121 return true;
122 }
123
124 static bool HandleServerDebugCommand(ChatHandler* handler, char const* /*args*/)
125 {
126 uint16 worldPort = uint16(sWorld->getIntConfig(CONFIG_PORT_WORLD));
127 std::string dbPortOutput;
128
129 {
130 uint16 dbPort = 0;
131 if (QueryResult res = LoginDatabase.PQuery("SELECT port FROM realmlist WHERE id = {}", realm.Id.Realm))
132 dbPort = (*res)[0].GetUInt16();
133
134 if (dbPort)
135 dbPortOutput = Trinity::StringFormat("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
136 else
137 dbPortOutput = Trinity::StringFormat("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
138 }
139
141 handler->PSendSysMessage("Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
142 handler->PSendSysMessage("Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
143 handler->PSendSysMessage("Using MySQL version: %u", MySQL::GetLibraryVersion());
144 handler->PSendSysMessage("Using CMake version: %s", GitRevision::GetCMakeVersion());
145
146 handler->PSendSysMessage("Compiled on: %s", GitRevision::GetHostOSVersion());
147
148 uint32 updateFlags = sConfigMgr->GetIntDefault("Updates.EnableDatabases", DatabaseLoader::DATABASE_NONE);
149 if (!updateFlags)
150 handler->SendSysMessage("Automatic database updates are disabled for all databases!");
151 else
152 {
153 static char const* const databaseNames[3 /*TOTAL_DATABASES*/] =
154 {
155 "Auth",
156 "Characters",
157 "World"
158 };
159
160 std::string availableUpdateDatabases;
161 for (uint32 i = 0; i < 3 /* TOTAL_DATABASES*/; ++i)
162 {
163 if (!(updateFlags & (1 << i)))
164 continue;
165
166 availableUpdateDatabases += databaseNames[i];
167 if (i != 3 /*TOTAL_DATABASES*/ - 1)
168 availableUpdateDatabases += ", ";
169 }
170
171 handler->PSendSysMessage("Automatic database updates are enabled for the following databases: %s", availableUpdateDatabases.c_str());
172 }
173
174 handler->PSendSysMessage("Worldserver listening connections on port {}", worldPort);
175 handler->PSendSysMessage("%s", dbPortOutput.c_str());
176
177 bool vmapIndoorCheck = sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK);
180
181 bool mmapEnabled = sWorld->getBoolConfig(CONFIG_ENABLE_MMAPS);
182
183 std::string dataDir = sWorld->GetDataPath();
184 std::vector<std::string> subDirs;
185 subDirs.emplace_back("maps");
186 if (vmapIndoorCheck || vmapLOSCheck || vmapHeightCheck)
187 {
188 handler->PSendSysMessage("VMAPs status: Enabled. LineOfSight: %i, getHeight: %i, indoorCheck: %i", vmapLOSCheck, vmapHeightCheck, vmapIndoorCheck);
189 subDirs.emplace_back("vmaps");
190 }
191 else
192 handler->SendSysMessage("VMAPs status: Disabled");
193
194 if (mmapEnabled)
195 {
196 handler->SendSysMessage("MMAPs status: Enabled");
197 subDirs.emplace_back("mmaps");
198 }
199 else
200 handler->SendSysMessage("MMAPs status: Disabled");
201
202 for (std::string const& subDir : subDirs)
203 {
204 boost::filesystem::path mapPath(dataDir);
205 mapPath /= subDir;
206
207 if (!boost::filesystem::exists(mapPath))
208 {
209 handler->PSendSysMessage("%s directory doesn't exist!. Using path: %s", subDir.c_str(), mapPath.generic_string().c_str());
210 continue;
211 }
212
213 auto end = boost::filesystem::directory_iterator();
214 std::size_t folderSize = std::accumulate(boost::filesystem::directory_iterator(mapPath), end, std::size_t(0), [](std::size_t val, boost::filesystem::path const& mapFile)
215 {
216 boost::system::error_code ec;
217 if (boost::filesystem::is_regular_file(mapFile, ec))
218 val += boost::filesystem::file_size(mapFile);
219 return val;
220 });
221
222 handler->PSendSysMessage("%s directory located in %s. Total size: " SZFMTD " bytes", subDir.c_str(), mapPath.generic_string().c_str(), folderSize);
223 }
224
225 LocaleConstant defaultLocale = sWorld->GetDefaultDbcLocale();
226 uint32 availableLocalesMask = (1 << defaultLocale);
227
228 for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
229 {
230 LocaleConstant locale = static_cast<LocaleConstant>(i);
231 if (locale == defaultLocale)
232 continue;
233
234 if (sWorld->GetAvailableDbcLocale(locale) != defaultLocale)
235 availableLocalesMask |= (1 << locale);
236 }
237
238 std::string availableLocales;
239 for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
240 {
241 if (!(availableLocalesMask & (1 << i)))
242 continue;
243
244 availableLocales += localeNames[i];
245 if (i != TOTAL_LOCALES - 1)
246 availableLocales += " ";
247 }
248
249 handler->PSendSysMessage("Using %s DBC Locale as default. All available DBC locales: %s", localeNames[defaultLocale], availableLocales.c_str());
250
251 handler->PSendSysMessage("Using World DB: %s", sWorld->GetDBVersion());
252
253 handler->PSendSysMessage("LoginDatabase queue size: %zu", LoginDatabase.QueueSize());
254 handler->PSendSysMessage("CharacterDatabase queue size: %zu", CharacterDatabase.QueueSize());
255 handler->PSendSysMessage("WorldDatabase queue size: %zu", WorldDatabase.QueueSize());
256 return true;
257 }
258
259 static bool HandleServerInfoCommand(ChatHandler* handler, char const* /*args*/)
260 {
261 uint32 playersNum = sWorld->GetPlayerCount();
262 uint32 maxPlayersNum = sWorld->GetMaxPlayerCount();
263 uint32 activeClientsNum = sWorld->GetActiveSessionCount();
264 uint32 queuedClientsNum = sWorld->GetQueuedSessionCount();
265 uint32 maxActiveClientsNum = sWorld->GetMaxActiveSessionCount();
266 uint32 maxQueuedClientsNum = sWorld->GetMaxQueuedSessionCount();
267 std::string uptime = secsToTimeString(GameTime::GetUptime());
269
271 handler->PSendSysMessage(LANG_CONNECTED_PLAYERS, playersNum, maxPlayersNum);
272 handler->PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum);
273 handler->PSendSysMessage(LANG_UPTIME, uptime.c_str());
274 handler->PSendSysMessage(LANG_UPDATE_DIFF, updateTime);
275 // Can't use sWorld->ShutdownMsg here in case of console command
276 if (sWorld->IsShuttingDown())
277 handler->PSendSysMessage(LANG_SHUTDOWN_TIMELEFT, secsToTimeString(sWorld->GetShutDownTimeLeft()).c_str());
278
279 return true;
280 }
281 // Display the 'Message of the day' for the realm
282 static bool HandleServerMotdCommand(ChatHandler* handler, char const* /*args*/)
283 {
284 std::string motd;
285 for (std::string const& line : sWorld->GetMotd())
286 motd += line;
287 handler->PSendSysMessage(LANG_MOTD_CURRENT, motd.c_str());
288 return true;
289 }
290
291 static bool HandleServerPLimitCommand(ChatHandler* handler, char const* args)
292 {
293 if (*args)
294 {
295 char* paramStr = strtok((char*)args, " ");
296 if (!paramStr)
297 return false;
298
299 int32 limit = strlen(paramStr);
300
301 if (strncmp(paramStr, "player", limit) == 0)
302 sWorld->SetPlayerSecurityLimit(SEC_PLAYER);
303 else if (strncmp(paramStr, "moderator", limit) == 0)
304 sWorld->SetPlayerSecurityLimit(SEC_MODERATOR);
305 else if (strncmp(paramStr, "gamemaster", limit) == 0)
306 sWorld->SetPlayerSecurityLimit(SEC_GAMEMASTER);
307 else if (strncmp(paramStr, "administrator", limit) == 0)
308 sWorld->SetPlayerSecurityLimit(SEC_ADMINISTRATOR);
309 else if (strncmp(paramStr, "reset", limit) == 0)
310 {
311 sWorld->SetPlayerAmountLimit(sConfigMgr->GetIntDefault("PlayerLimit", 100));
312 sWorld->LoadDBAllowedSecurityLevel();
313 }
314 else
315 {
316 int32 value = atoi(paramStr);
317 if (value < 0)
318 sWorld->SetPlayerSecurityLimit(AccountTypes(-value));
319 else
320 sWorld->SetPlayerAmountLimit(uint32(value));
321 }
322 }
323
324 uint32 playerAmountLimit = sWorld->GetPlayerAmountLimit();
325 AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
326 char const* secName = "";
327 switch (allowedAccountType)
328 {
329 case SEC_PLAYER:
330 secName = "Player";
331 break;
332 case SEC_MODERATOR:
333 secName = "Moderator";
334 break;
335 case SEC_GAMEMASTER:
336 secName = "Gamemaster";
337 break;
339 secName = "Administrator";
340 break;
341 default:
342 secName = "<unknown>";
343 break;
344 }
345 handler->PSendSysMessage("Player limits: amount %u, min. security level %s.", playerAmountLimit, secName);
346
347 return true;
348 }
349
350 static bool HandleServerShutDownCancelCommand(ChatHandler* handler, char const* /*args*/)
351 {
352 if (uint32 timer = sWorld->ShutdownCancel())
354
355 return true;
356 }
357
358 static bool IsOnlyUser(WorldSession* mySession)
359 {
360 // check if there is any session connected from a different address
361 std::string myAddr = mySession ? mySession->GetRemoteAddress() : "";
362 SessionMap const& sessions = sWorld->GetAllSessions();
363 for (SessionMap::value_type const& session : sessions)
364 if (session.second && myAddr != session.second->GetRemoteAddress())
365 return false;
366 return true;
367 }
368 static bool HandleServerShutDownCommand(ChatHandler* handler, char const* args)
369 {
370 return ShutdownServer(handler, args, 0, SHUTDOWN_EXIT_CODE);
371 }
372
373 static bool HandleServerRestartCommand(ChatHandler* handler, char const* args)
374 {
376 }
377
378 static bool HandleServerForceShutDownCommand(ChatHandler* handler, char const* args)
379 {
381 }
382
383 static bool HandleServerForceRestartCommand(ChatHandler* handler, char const* args)
384 {
386 }
387
388 static bool HandleServerIdleShutDownCommand(ChatHandler* handler, char const* args)
389 {
391 }
392
393 static bool HandleServerIdleRestartCommand(ChatHandler* handler, char const* args)
394 {
396 }
397
398 // Exit the realm
399 static bool HandleServerExitCommand(ChatHandler* handler, char const* /*args*/)
400 {
403 return true;
404 }
405
406 // Define the 'Message of the day' for the realm
407 static bool HandleServerSetMotdCommand(ChatHandler* handler, char const* args)
408 {
409 sWorld->SetMotd(args);
410 handler->PSendSysMessage(LANG_MOTD_NEW, args);
411 return true;
412 }
413
414 // Set whether we accept new clients
415 static bool HandleServerSetClosedCommand(ChatHandler* handler, char const* args)
416 {
417 if (strncmp(args, "on", 3) == 0)
418 {
420 sWorld->SetClosed(true);
421 return true;
422 }
423 else if (strncmp(args, "off", 4) == 0)
424 {
426 sWorld->SetClosed(false);
427 return true;
428 }
429
431 handler->SetSentErrorMessage(true);
432 return false;
433 }
434
435 // Set the level of logging
436 static bool HandleServerSetLogLevelCommand(ChatHandler* /*handler*/, std::string const& type, std::string const& name, int32 level)
437 {
438 if (name.empty() || level < 0 || (type != "a" && type != "l"))
439 return false;
440
441 sLog->SetLogLevel(name, level, type == "l");
442 return true;
443 }
444
445private:
446 static bool ParseExitCode(char const* exitCodeStr, int32& exitCode)
447 {
448 exitCode = atoi(exitCodeStr);
449
450 // Handle atoi() errors
451 if (exitCode == 0 && (exitCodeStr[0] != '0' || exitCodeStr[1] != '\0'))
452 return false;
453
454 // Exit code should be in range of 0-125, 126-255 is used
455 // in many shells for their own return codes and code > 255
456 // is not supported in many others
457 if (exitCode < 0 || exitCode > 125)
458 return false;
459
460 return true;
461 }
462
463 static bool ShutdownServer(ChatHandler* handler, char const* args, uint32 shutdownMask, int32 defaultExitCode)
464 {
465 if (!*args)
466 return false;
467
468 if (strlen(args) > 255)
469 return false;
470
471 // #delay [#exit_code] [reason]
472 int32 delay = 0;
473 char* delayStr = strtok((char*)args, " ");
474 if (!delayStr)
475 return false;
476
477 if (isNumeric(delayStr))
478 {
479 delay = atoi(delayStr);
480 // Prevent interpret wrong arg value as 0 secs shutdown time
481 if ((delay == 0 && (delayStr[0] != '0' || delayStr[1] != '\0')) || delay < 0)
482 return false;
483 }
484 else
485 {
486 delay = TimeStringToSecs(std::string(delayStr));
487
488 if (delay == 0)
489 return false;
490 }
491
492 char* exitCodeStr = nullptr;
493
494 char reason[256] = { 0 };
495
496 while (char* nextToken = strtok(nullptr, " "))
497 {
498 if (isNumeric(nextToken))
499 exitCodeStr = nextToken;
500 else
501 {
502 strcat(reason, nextToken);
503 if (char* remainingTokens = strtok(nullptr, "\0"))
504 {
505 strcat(reason, " ");
506 strcat(reason, remainingTokens);
507 }
508 break;
509 }
510 }
511
512 int32 exitCode = defaultExitCode;
513 if (exitCodeStr)
514 if (!ParseExitCode(exitCodeStr, exitCode))
515 return false;
516
517 // Override parameter "delay" with the configuration value if there are still players connected and "force" parameter was not specified
518 if (delay < (int32)sWorld->getIntConfig(CONFIG_FORCE_SHUTDOWN_THRESHOLD) && !(shutdownMask & SHUTDOWN_MASK_FORCE) && !IsOnlyUser(handler->GetSession()))
519 {
520 delay = (int32)sWorld->getIntConfig(CONFIG_FORCE_SHUTDOWN_THRESHOLD);
521 handler->PSendSysMessage(LANG_SHUTDOWN_DELAYED, delay);
522 }
523
524 sWorld->ShutdownServ(delay, shutdownMask, static_cast<uint8>(exitCode), std::string(reason));
525
526 return true;
527 }
528};
529
char const * localeNames[TOTAL_LOCALES]
Definition Common.cpp:20
LocaleConstant
Definition Common.h:48
@ TOTAL_LOCALES
Definition Common.h:59
AccountTypes
Definition Common.h:39
@ SEC_PLAYER
Definition Common.h:40
@ SEC_ADMINISTRATOR
Definition Common.h:43
@ SEC_GAMEMASTER
Definition Common.h:42
@ SEC_MODERATOR
Definition Common.h:41
#define sConfigMgr
Definition Config.h:60
std::shared_ptr< ResultSet > QueryResult
DatabaseWorkerPool< LoginDatabaseConnection > LoginDatabase
Accessor to the realm/login database.
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
#define SZFMTD
Definition Define.h:123
@ LANG_MOTD_CURRENT
Definition Language.h:88
@ LANG_UPDATE_DIFF
Definition Language.h:51
@ LANG_SHUTDOWN_DELAYED
Definition Language.h:1242
@ LANG_COMMAND_EXIT
Definition Language.h:837
@ LANG_USE_BOL
Definition Language.h:309
@ LANG_CONNECTED_USERS
Definition Language.h:44
@ LANG_SHUTDOWN_CANCELLED
Definition Language.h:1243
@ LANG_WORLD_CLOSED
Definition Language.h:1178
@ LANG_UPTIME
Definition Language.h:45
@ LANG_MOTD_NEW
Definition Language.h:877
@ LANG_WORLD_OPENED
Definition Language.h:1179
@ LANG_CONNECTED_PLAYERS
Definition Language.h:92
@ LANG_SHUTDOWN_TIMELEFT
Definition Language.h:52
#define sLog
Definition Log.h:130
Role Based Access Control related classes definition.
WorldUpdateTime sWorldUpdateTime
std::string secsToTimeString(uint64 timeInSecs, TimeFormat timeFormat, bool hoursOnly)
Definition Util.cpp:115
uint32 TimeStringToSecs(std::string const &timestring)
Definition Util.cpp:258
bool isNumeric(wchar_t wchar)
Definition Util.h:176
WorldSession * GetSession()
Definition Chat.h:46
void SetSentErrorMessage(bool val)
Definition Chat.h:134
void PSendSysMessage(char const *fmt, Args &&... args)
Definition Chat.h:69
virtual void SendSysMessage(std::string_view str, bool escapeCharacters=false)
Definition Chat.cpp:101
uint32 GetLastUpdateTime() const
bool isHeightCalcEnabled() const
bool isLineOfSightCalcEnabled() const
static VMapManager2 * createOrGetVMapManager()
Player session in the World.
std::string const & GetRemoteAddress() const
static void StopNow(uint8 exitcode)
Definition World.h:673
static bool ShutdownServer(ChatHandler *handler, char const *args, uint32 shutdownMask, int32 defaultExitCode)
static bool HandleServerForceShutDownCommand(ChatHandler *handler, char const *args)
static bool HandleServerDebugCommand(ChatHandler *handler, char const *)
static bool HandleServerSetMotdCommand(ChatHandler *handler, char const *args)
static bool HandleServerExitCommand(ChatHandler *handler, char const *)
static bool HandleServerCorpsesCommand(ChatHandler *, char const *)
static bool HandleServerShutDownCommand(ChatHandler *handler, char const *args)
static bool HandleServerForceRestartCommand(ChatHandler *handler, char const *args)
static bool HandleServerPLimitCommand(ChatHandler *handler, char const *args)
static bool HandleServerIdleShutDownCommand(ChatHandler *handler, char const *args)
static bool HandleServerSetLogLevelCommand(ChatHandler *, std::string const &type, std::string const &name, int32 level)
std::vector< ChatCommand > GetCommands() const override
Definition cs_server.cpp:60
static bool HandleServerMotdCommand(ChatHandler *handler, char const *)
static bool IsOnlyUser(WorldSession *mySession)
static bool HandleServerRestartCommand(ChatHandler *handler, char const *args)
static bool HandleServerIdleRestartCommand(ChatHandler *handler, char const *args)
static bool HandleServerSetClosedCommand(ChatHandler *handler, char const *args)
static bool ParseExitCode(char const *exitCodeStr, int32 &exitCode)
static bool HandleServerInfoCommand(ChatHandler *handler, char const *)
static bool HandleServerShutDownCancelCommand(ChatHandler *handler, char const *)
void AddSC_server_commandscript()
#define sWorld
Definition World.h:900
std::unordered_map< uint32, WorldSession * > SessionMap
Definition World.h:553
Realm realm
Definition World.cpp:3605
@ CONFIG_FORCE_SHUTDOWN_THRESHOLD
Definition World.h:266
@ CONFIG_PORT_WORLD
Definition World.h:217
@ CONFIG_ENABLE_MMAPS
Definition World.h:156
@ CONFIG_VMAP_INDOOR_CHECK
Definition World.h:135
@ RESTART_EXIT_CODE
Definition World.h:65
@ SHUTDOWN_EXIT_CODE
Definition World.h:63
@ SHUTDOWN_MASK_RESTART
Definition World.h:56
@ SHUTDOWN_MASK_FORCE
Definition World.h:58
@ SHUTDOWN_MASK_IDLE
Definition World.h:57
uint32 GetUptime()
Uptime (in secs)
Definition GameTime.cpp:62
TC_COMMON_API char const * GetCMakeVersion()
TC_COMMON_API char const * GetHostOSVersion()
TC_COMMON_API char const * GetFullVersion()
TC_DATABASE_API uint32 GetLibraryVersion()
std::string StringFormat(FormatString< Args... > fmt, Args &&... args)
Default TC string format function.
@ RBAC_PERM_COMMAND_SERVER_SHUTDOWN_FORCE
Definition RBAC.h:708
@ RBAC_PERM_COMMAND_SERVER_SHUTDOWN
Definition RBAC.h:604
@ RBAC_PERM_COMMAND_SERVER_SET_LOGLEVEL
Definition RBAC.h:602
@ RBAC_PERM_COMMAND_SERVER_RESTART_CANCEL
Definition RBAC.h:598
@ RBAC_PERM_COMMAND_SERVER_SET
Definition RBAC.h:599
@ RBAC_PERM_COMMAND_SERVER_EXIT
Definition RBAC.h:590
@ RBAC_PERM_COMMAND_SERVER_RESTART
Definition RBAC.h:597
@ RBAC_PERM_COMMAND_SERVER_PLIMIT
Definition RBAC.h:596
@ RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN_CANCEL
Definition RBAC.h:594
@ RBAC_PERM_COMMAND_SERVER_SHUTDOWN_CANCEL
Definition RBAC.h:605
@ RBAC_PERM_COMMAND_SERVER_IDLERESTART_CANCEL
Definition RBAC.h:592
@ RBAC_PERM_COMMAND_SERVER
Definition RBAC.h:588
@ RBAC_PERM_COMMAND_SERVER_MOTD
Definition RBAC.h:606
@ RBAC_PERM_COMMAND_SERVER_SET_CLOSED
Definition RBAC.h:600
@ RBAC_PERM_COMMAND_SERVER_SET_MOTD
Definition RBAC.h:603
@ RBAC_PERM_COMMAND_SERVER_INFO
Definition RBAC.h:595
@ RBAC_PERM_COMMAND_SERVER_IDLERESTART
Definition RBAC.h:591
@ RBAC_PERM_COMMAND_SERVER_RESTART_FORCE
Definition RBAC.h:709
@ RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN
Definition RBAC.h:593
@ RBAC_PERM_COMMAND_SERVER_DEBUG
Definition RBAC.h:740
@ RBAC_PERM_COMMAND_SERVER_CORPSES
Definition RBAC.h:589
uint32 Realm
Definition Realm.h:44
RealmHandle Id
Definition Realm.h:67