gameServer/HWProtoLobbyState.hs
changeset 1866 36aa0ca6e8af
parent 1862 7f303aa066da
child 1871 ce5854fbc631
--- a/gameServer/HWProtoLobbyState.hs	Sat Mar 07 17:42:54 2009 +0000
+++ b/gameServer/HWProtoLobbyState.hs	Sat Mar 07 17:43:25 2009 +0000
@@ -96,7 +96,7 @@
 					[]
 				else
 					[AnswerThisClient  ["RUN_GAME"],
-					AnswerThisClient $ "GAMEMSG" : toEngineMsg "e$spectate 1" : (Foldable.toList $ roundMsgs jRoom)]
+					AnswerThisClient $ "EM" : toEngineMsg "e$spectate 1" : (Foldable.toList $ roundMsgs jRoom)]
 
 		answerTeams = if gameinprogress jRoom then
 				answerAllTeams (teamsAtStart jRoom)
@@ -124,8 +124,15 @@
 		maybeClient = Foldable.find (\cl -> kickNick == nick cl) clients
 		noSuchClient = isNothing maybeClient
 		kickID = clientUID $ fromJust maybeClient
-	--	room = rooms IntMap.! roomID client
-	--	roomInfo = if roomID client /= 0 then "room " ++ (name room) else "lobby"
+
+
+handleCmd_lobby clID clients rooms ["BAN", banNick] =
+	if not $ isAdministrator client then
+		[]
+	else
+		BanClient banNick : handleCmd_lobby clID clients rooms ["KICK", banNick]
+	where
+		client = clients IntMap.! clID
 
 
 handleCmd_lobby clID _ _ _ = [ProtocolError "Incorrect command (state: in lobby)"]