* Implement ".server set closed on/off" command to allow/deny new connections to the world.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-03-21 13:51:28 +01:00
parent bab99cedba
commit 55695eda78
10 changed files with 58 additions and 2 deletions

View File

@@ -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)
{