gameServer/HWProtoNEState.hs
changeset 8371 0551b5c3de9a
parent 5090 2922455e606e
child 8372 3c193ec03e09
--- a/gameServer/HWProtoNEState.hs	Thu Jan 10 22:59:46 2013 +0400
+++ b/gameServer/HWProtoNEState.hs	Sat Jan 12 01:18:50 2013 +0400
@@ -48,4 +48,17 @@
         return [ByeClient "Authentication failed"]
 
 
+handleCmd_NotEntered ["CHECKER", protoNum, newNick, password] = do
+    (ci, irnc) <- ask
+    let cl = irnc `client` ci
+
+    if parsedProto == 0 then return [ProtocolError "Bad number"]
+        else
+        return $ [
+            ModifyClient (\c -> c{clientProto = parsedProto, nick = newNick, webPassword = password, isChecker = True})
+            , CheckRegistered]
+    where
+        parsedProto = readInt_ protoNum
+
+
 handleCmd_NotEntered _ = return [ProtocolError "Incorrect command (state: not entered)"]