--- a/gameServer/HWProtoCore.hs Thu Jan 17 18:12:30 2013 +0100
+++ b/gameServer/HWProtoCore.hs Thu Jan 17 23:17:39 2013 +0400
@@ -4,6 +4,7 @@
import Control.Monad.Reader
import Data.Maybe
import qualified Data.ByteString.Char8 as B
+import qualified Data.List as L
--------------------------------------
import CoreTypes
import Actions
@@ -32,6 +33,16 @@
else
return [ModifyClient (\c -> c{pingsQueue = pingsQueue c - 1})]
+handleCmd ("CMD" : params) =
+ let c = concatMap B.words params in
+ if not $ null c then
+ h $ (upperCase . head $ c) : tail c
+ else
+ return []
+ where
+ h ["DELEGATE", n] = handleCmd ["DELEGATE", n]
+ h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c]
+
handleCmd cmd = do
(ci, irnc) <- ask
if logonPassed (irnc `client` ci) then