gameServer/HWProtoNEState.hs
changeset 8401 87410ae372f6
parent 8372 3c193ec03e09
child 10076 b235e520ea21
--- a/gameServer/HWProtoNEState.hs	Fri Jan 18 11:47:23 2013 +0100
+++ b/gameServer/HWProtoNEState.hs	Sat Jan 19 00:51:28 2013 +0400
@@ -14,9 +14,9 @@
 handleCmd_NotEntered ["NICK", newNick] = do
     (ci, irnc) <- ask
     let cl = irnc `client` ci
-    if not . B.null $ nick cl then return [ProtocolError "Nickname already chosen"]
+    if not . B.null $ nick cl then return [ProtocolError $ loc "Nickname already chosen"]
         else
-        if illegalName newNick then return [ByeClient "Illegal nickname"]
+        if illegalName newNick then return [ByeClient $ loc "Illegal nickname"]
             else
             return $
                 ModifyClient (\c -> c{nick = newNick}) :
@@ -26,9 +26,9 @@
 handleCmd_NotEntered ["PROTO", protoNum] = do
     (ci, irnc) <- ask
     let cl = irnc `client` ci
-    if clientProto cl > 0 then return [ProtocolError "Protocol already known"]
+    if clientProto cl > 0 then return [ProtocolError $ loc "Protocol already known"]
         else
-        if parsedProto == 0 then return [ProtocolError "Bad number"]
+        if parsedProto == 0 then return [ProtocolError $ loc "Bad number"]
             else
             return $
                 ModifyClient (\c -> c{clientProto = parsedProto}) :
@@ -53,7 +53,7 @@
     (ci, irnc) <- ask
     let cl = irnc `client` ci
 
-    if parsedProto == 0 then return [ProtocolError "Bad number"]
+    if parsedProto == 0 then return [ProtocolError $ loc "Bad number"]
         else
         return $ [
             ModifyClient (\c -> c{clientProto = parsedProto, nick = newNick, webPassword = password, isChecker = True})