diff options
| author | XTZGZoReX <none@none> | 2009-03-21 13:51:28 +0100 |
|---|---|---|
| committer | XTZGZoReX <none@none> | 2009-03-21 13:51:28 +0100 |
| commit | 55695eda786667a34d6c0ae59496d787dfba4b3e (patch) | |
| tree | 3d62e720455cef466b992a5055cfb115c6392403 /src/game/Level3.cpp | |
| parent | bab99cedba0217e050708e4d8eb8868fb7596343 (diff) | |
* Implement ".server set closed on/off" command to allow/deny new connections to the world.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level3.cpp')
| -rw-r--r-- | src/game/Level3.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 46e5c880b16..bd2fadcb0ee 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -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) { |
