gameServer/HWProtoCore.hs
changeset 2126 cb249fa8e3da
parent 1929 7e6cc8da1c58
child 2311 977ee15c3c1f
equal deleted inserted replaced
2125:3ebe8cd30b84 2126:cb249fa8e3da
    46 		[AnswerThisClient
    46 		[AnswerThisClient
    47 			["INFO",
    47 			["INFO",
    48 			nick client,
    48 			nick client,
    49 			"[" ++ host client ++ "]",
    49 			"[" ++ host client ++ "]",
    50 			protoNumber2ver $ clientProto client,
    50 			protoNumber2ver $ clientProto client,
    51 			roomInfo]]
    51 			"[" ++ roomInfo ++ "]"]]
    52 	where
    52 	where
    53 		maybeClient = find (\cl -> asknick == nick cl) clients
    53 		maybeClient = find (\cl -> asknick == nick cl) clients
    54 		noSuchClient = isNothing maybeClient
    54 		noSuchClient = isNothing maybeClient
    55 		client = fromJust maybeClient
    55 		client = fromJust maybeClient
    56 		room = rooms IntMap.! roomID client
    56 		room = rooms IntMap.! roomID client
    57 		roomInfo = if roomID client /= 0 then "room " ++ (name room) else "lobby"
    57 		roomInfo = if roomID client /= 0 then roomMasterSign ++ "room " ++ (name room) else adminSign ++ "lobby"
       
    58 		roomMasterSign = if isMaster client then "@" else ""
       
    59 		adminSign = if isAdministrator client then "@" else ""
    58 
    60 
    59 
    61 
    60 handleCmd_loggedin clID clients rooms cmd =
    62 handleCmd_loggedin clID clients rooms cmd =
    61 	if roomID client == 0 then
    63 	if roomID client == 0 then
    62 		handleCmd_lobby clID clients rooms cmd
    64 		handleCmd_lobby clID clients rooms cmd