Use readInt_
authorunc0rr
Sun, 03 Apr 2011 13:31:33 +0400
changeset 5090 2922455e606e
parent 5089 90266b67fff8
child 5091 288dcbda3b77
Use readInt_
gameServer/Actions.hs
gameServer/HWProtoNEState.hs
--- a/gameServer/Actions.hs	Sat Apr 02 22:17:08 2011 -0400
+++ b/gameServer/Actions.hs	Sun Apr 03 13:31:33 2011 +0400
@@ -406,7 +406,7 @@
         [
             AnswerClients [sendChan cl] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/", serverVersion]
             , CheckBanned
---            , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
+            , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
         ]
 
 
--- a/gameServer/HWProtoNEState.hs	Sat Apr 02 22:17:08 2011 -0400
+++ b/gameServer/HWProtoNEState.hs	Sun Apr 03 13:31:33 2011 +0400
@@ -35,9 +35,7 @@
                 AnswerClients [sendChan cl] ["PROTO", showB parsedProto] :
                 [CheckRegistered | not . B.null $ nick cl]
     where
-        parsedProto = case B.readInt protoNum of
-                           Just (i, t) | B.null t -> fromIntegral i
-                           _ -> 0
+        parsedProto = readInt_ protoNum
 
 
 handleCmd_NotEntered ["PASSWORD", passwd] = do