gameServer/HWProtoCore.hs
changeset 14401 8ad85859dd3f
parent 14139 589a752c01ca
child 14402 32e8c81ca35c
--- a/gameServer/HWProtoCore.hs	Sat Dec 08 14:13:18 2018 +0100
+++ b/gameServer/HWProtoCore.hs	Sat Dec 08 14:19:11 2018 +0100
@@ -120,11 +120,11 @@
         h "INFO" n | not $ B.null n = handleCmd ["INFO", n]
         h "HELP" _ = handleCmd ["HELP"]
         h "REGISTERED_ONLY" _ = serverAdminOnly $ do
-            cl <- thisClient
+            rnc <- liftM snd ask
+            let chans = map (sendChan . client rnc) $ allClients rnc
             return
                 [ModifyServerInfo(\s -> s{isRegisteredUsersOnly = not $ isRegisteredUsersOnly s})
-                -- TODO: Say whether 'registered only' state is on or off
-                , AnswerClients [sendChan cl] ["CHAT", nickServer, loc "'Registered only' state toggled."]
+                , ShowRegisteredOnlyState chans
                 ]
         h "SUPER_POWER" _ = serverAdminOnly $ do
             cl <- thisClient