gameServer/HWProtoCore.hs
branchserver_refactor
changeset 4614 26661bf28dd5
parent 4612 e82758d6f924
child 4904 0eab727d4717
--- a/gameServer/HWProtoCore.hs	Sat Jan 29 21:33:24 2011 +0300
+++ b/gameServer/HWProtoCore.hs	Sun Jan 30 20:32:23 2011 +0300
@@ -3,7 +3,6 @@
 
 import Control.Monad.Reader
 import Data.Maybe
-import Data.List
 import qualified Data.ByteString.Char8 as B
 --------------------------------------
 import CoreTypes
@@ -43,8 +42,7 @@
 
 handleCmd_loggedin ["INFO", asknick] = do
     (_, rnc) <- ask
-    let allClientIDs = allClients rnc
-    let maybeClientId = find (\clId -> asknick == nick (client rnc clId)) allClientIDs
+    maybeClientId <- clientByNick asknick
     let noSuchClient = isNothing maybeClientId
     let clientId = fromJust maybeClientId
     let cl = rnc `client` fromJust maybeClientId