mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
* Implement ".server set closed on/off" command to allow/deny new connections to the world.
--HG-- branch : trunk
This commit is contained in:
@@ -6821,6 +6821,29 @@ bool ChatHandler::HandleServerSetMotdCommand(const char* args)
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Set whether we accept new clients
|
||||
bool ChatHandler::HandleServerSetClosedCommand(const char* args)
|
||||
{
|
||||
std::string arg = args;
|
||||
|
||||
if(args == "on")
|
||||
{
|
||||
SendSysMessage(LANG_WORLD_CLOSED);
|
||||
sWorld.SetClosed(true);
|
||||
return true;
|
||||
}
|
||||
if(args == "off")
|
||||
{
|
||||
SendSysMessage(LANG_WORLD_OPENED);
|
||||
sWorld.SetClosed(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Set/Unset the expansion level for an account
|
||||
bool ChatHandler::HandleAccountSetAddonCommand(const char* args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user