gameServer/HWProtoCore.hs
changeset 11054 6e575b29881c
parent 11046 47a8c19ecb60
child 11465 0ae2e4c13bd1
--- a/gameServer/HWProtoCore.hs	Thu Aug 27 14:47:38 2015 +0300
+++ b/gameServer/HWProtoCore.hs	Thu Aug 27 22:03:57 2015 +0300
@@ -50,7 +50,19 @@
         else
         return [ModifyClient (\c -> c{pingsQueue = pingsQueue c - 1})]
 
-handleCmd ["CMD", parameters] = uncurry h $ extractParameters parameters
+handleCmd cmd = do
+    (ci, irnc) <- ask
+    let cl = irnc `client` ci
+    if logonPassed cl then
+        if isChecker cl then
+            handleCmd_checker cmd
+            else
+            handleCmd_loggedin cmd
+        else
+        handleCmd_NotEntered cmd
+
+
+handleCmd_loggedin ["CMD", parameters] = uncurry h $ extractParameters parameters
     where
         h "DELEGATE" n | not $ B.null n = handleCmd ["DELEGATE", n]
         h "SAVEROOM" n | not $ B.null n = handleCmd ["SAVEROOM", n]
@@ -84,19 +96,6 @@
 
         extractParameters p = let (a, b) = B.break (== ' ') p in (upperCase a, B.dropWhile (== ' ') b)
 
-
-handleCmd cmd = do
-    (ci, irnc) <- ask
-    let cl = irnc `client` ci
-    if logonPassed cl then
-        if isChecker cl then
-            handleCmd_checker cmd
-            else
-            handleCmd_loggedin cmd
-        else
-        handleCmd_NotEntered cmd
-
-
 handleCmd_loggedin ["INFO", asknick] = do
     (_, rnc) <- ask
     maybeClientId <- clientByNick asknick