gameServer/HWProtoNEState.hs
changeset 13084 81c154fd4380
parent 11046 47a8c19ecb60
child 13086 dce9f0b84a18
--- a/gameServer/HWProtoNEState.hs	Mon Mar 05 16:16:32 2018 +0100
+++ b/gameServer/HWProtoNEState.hs	Mon Mar 05 19:05:10 2018 +0100
@@ -34,9 +34,9 @@
 handleCmd_NotEntered ["NICK", newNick] = do
     (ci, irnc) <- ask
     let cl = irnc `client` ci
-    if not . B.null $ nick cl then return [ProtocolError $ loc "Nickname already chosen"]
+    if not . B.null $ nick cl then return [ProtocolError $ loc "Nickname already taken."]
         else
-        if illegalName newNick then return [ByeClient $ loc "Illegal nickname"]
+        if illegalName newNick then return [ByeClient $ loc "Illegal nickname! Nicknames must be between 1-40 characters long, must not have a trailing or leading space and must not have any of these characters: $()*+?[]^{|}"]
             else
             return $
                 ModifyClient (\c -> c{nick = newNick}) :
@@ -46,9 +46,9 @@
 handleCmd_NotEntered ["PROTO", protoNum] = do
     (ci, irnc) <- ask
     let cl = irnc `client` ci
-    if clientProto cl > 0 then return [ProtocolError $ loc "Protocol already known"]
+    if clientProto cl > 0 then return [ProtocolError $ loc "Protocol already known."]
         else
-        if parsedProto == 0 then return [ProtocolError $ loc "Bad number"]
+        if parsedProto == 0 then return [ProtocolError $ loc "Bad number."]
             else
             return $
                 ModifyClient (\c -> c{clientProto = parsedProto}) :
@@ -90,7 +90,7 @@
     (ci, irnc) <- ask
     let cl = irnc `client` ci
 
-    if parsedProto == 0 then return [ProtocolError $ loc "Bad number"]
+    if parsedProto == 0 then return [ProtocolError $ loc "Bad number."]
         else
         return $ [
             ModifyClient (\c -> c{clientProto = parsedProto, nick = newNick, webPassword = password, isChecker = True})