--- a/gameServer/Actions.hs Thu Mar 26 19:22:40 2009 +0000
+++ b/gameServer/Actions.hs Thu Mar 26 19:28:56 2009 +0000
@@ -18,6 +18,7 @@
| AnswerThisRoom [String]
| AnswerOthersInRoom [String]
| AnswerLobby [String]
+ | SendServerMessage
| RoomAddThisClient Int -- roomID
| RoomRemoveThisClient
| RemoveTeam String
@@ -89,6 +90,11 @@
room = rooms ! 0
+processAction (clID, serverInfo, clients, rooms) SendServerMessage = do
+ writeChan (sendChan $ clients ! clID) $ ["SERVER_MESSAGE", serverMessage serverInfo]
+ return (clID, serverInfo, clients, rooms)
+
+
processAction (clID, serverInfo, clients, rooms) (ProtocolError msg) = do
writeChan (sendChan $ clients ! clID) ["ERROR", msg]
return (clID, serverInfo, clients, rooms)
@@ -264,6 +270,7 @@
processAction (clID, serverInfo, clients, rooms) (ProcessAccountInfo info) = do
+ processAction (clID, serverInfo, clients, rooms) SendServerMessage
case info of
HasAccount passwd isAdmin -> do
infoM "Clients" $ show clID ++ " has account"