# HG changeset patch # User Wuzzy # Date 1544275344 -3600 # Node ID 32e8c81ca35c254aa39ef01202f1f9d49f8bcf36 # Parent 8ad85859dd3fd47f6438ddc6cc163f9db180eb82 Add reminder to call /restart_server with "yes" diff -r 8ad85859dd3f -r 32e8c81ca35c gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Sat Dec 08 14:19:11 2018 +0100 +++ b/gameServer/HWProtoCore.hs Sat Dec 08 14:22:24 2018 +0100 @@ -107,7 +107,7 @@ -- lobby-only commands h "STATS" _ = handleCmd_lobbyOnly ["STATS"] - h "RESTART_SERVER" "YES" = handleCmd_lobbyOnly ["RESTART_SERVER"] + h "RESTART_SERVER" p = handleCmd_lobbyOnly ["RESTART_SERVER", upperCase p] -- room and lobby commands h "QUIT" _ = handleCmd ["QUIT"] diff -r 8ad85859dd3f -r 32e8c81ca35c gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Sat Dec 08 14:19:11 2018 +0100 +++ b/gameServer/HWProtoLobbyState.hs Sat Dec 08 14:22:24 2018 +0100 @@ -220,12 +220,18 @@ handleCmd_lobby ["CLEAR_ACCOUNTS_CACHE"] = serverAdminOnly $ return [ClearAccountsCache] +handleCmd_lobby ["RESTART_SERVER", "YES"] = serverAdminOnly $ + return [RestartServer] + handleCmd_lobby ["RESTART_SERVER"] = serverAdminOnly $ - return [RestartServer] + return [Warning $ loc "Please confirm server restart with '/restart_server yes'."] + +handleCmd_lobby ["RESTART_SERVER", _] = handleCmd_lobby ["RESTART_SERVER"] + handleCmd_lobby ["STATS"] = serverAdminOnly $ return [Stats] handleCmd_lobby (s:_) = return [ProtocolError $ "Incorrect command '" `B.append` s `B.append` "' (state: in lobby)"] -handleCmd_lobby [] = return [ProtocolError "Empty command (state: in lobby)"] \ No newline at end of file +handleCmd_lobby [] = return [ProtocolError "Empty command (state: in lobby)"]