gameServer/HWProtoCore.hs
changeset 13832 28a86816dc01
parent 13830 5d58fce48b1d
child 13836 b07610de9957
--- a/gameServer/HWProtoCore.hs	Thu Oct 04 14:36:42 2018 +0200
+++ b/gameServer/HWProtoCore.hs	Thu Oct 04 14:54:57 2018 +0200
@@ -65,6 +65,10 @@
         else
         handleCmd_NotEntered cmd
 
+unknownCmdWarningText :: B.ByteString
+unknownCmdWarningText = loc "Unknown command or invalid parameters. Say '/help' in chat for a list of commands."
+
+handleCmd_loggedin ["CMD"] = return [Warning unknownCmdWarningText]
 
 handleCmd_loggedin ["CMD", parameters] = uncurry h $ extractParameters parameters
     where
@@ -111,7 +115,7 @@
                 [ModifyClient (\c -> c{hasSuperPower = True})
                 , AnswerClients [sendChan cl] ["CHAT", nickServer, loc "Super power activated."]
                 ]
-        h _ _ = return [Warning $ loc "Unknown command or invalid parameters. Say '/help' in chat for a list of commands." ]
+        h _ _ = return [Warning unknownCmdWarningText]
 
 
         extractParameters p = let (a, b) = B.break (== ' ') p in (upperCase a, B.dropWhile (== ' ') b)