# HG changeset patch
# User unc0rr
# Date 1440702237 -10800
# Node ID 6e575b29881c7a7a1c18fb4b7374db6a52e7e9c9
# Parent  a009cc19a6398cc2c23727e9adf04404d2138ef3
Check for CMD message a bit further down the control flow

diff -r a009cc19a639 -r 6e575b29881c gameServer/HWProtoCore.hs
--- 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