Tweak response messages to /super_power and /registered_only
authorWuzzy <Wuzzy2@mail.ru>
Sat, 25 Aug 2018 18:21:37 +0200
changeset 13694 91fe09213abc
parent 13693 af208acaada6
child 13695 e529a34872f9
Tweak response messages to /super_power and /registered_only
gameServer/HWProtoCore.hs
--- a/gameServer/HWProtoCore.hs	Sat Aug 25 18:04:06 2018 +0200
+++ b/gameServer/HWProtoCore.hs	Sat Aug 25 18:21:37 2018 +0200
@@ -104,9 +104,15 @@
             cl <- thisClient
             return
                 [ModifyServerInfo(\s -> s{isRegisteredUsersOnly = not $ isRegisteredUsersOnly s})
-                , AnswerClients [sendChan cl] ["CHAT", "[server]", "'Registered only' state toggled"]
+                -- TODO: Say whether 'registered only' state is on or off
+                , AnswerClients [sendChan cl] ["CHAT", "[server]", loc "'Registered only' state toggled."]
                 ]
-        h "SUPER_POWER" _ = serverAdminOnly $ return [ModifyClient (\c -> c{hasSuperPower = True})]
+        h "SUPER_POWER" _ = serverAdminOnly $ do
+            cl <- thisClient
+            return
+                [ModifyClient (\c -> c{hasSuperPower = True})
+                , AnswerClients [sendChan cl] ["CHAT", "[server]", loc "Super power activated."]
+                ]
         h _ _ = return [Warning $ loc "Unknown command or invalid parameters. Say '/help' in chat for a list of commands." ]