gameServer/Actions.hs
branchserver_refactor
changeset 4610 9541b2a76067
parent 4606 4c521c4ab2b6
child 4622 8bdc879ee6b2
--- a/gameServer/Actions.hs	Fri Jan 28 22:34:07 2011 +0300
+++ b/gameServer/Actions.hs	Sat Jan 29 13:43:07 2011 +0300
@@ -32,6 +32,7 @@
     | JoinLobby
     | ProtocolError B.ByteString
     | Warning B.ByteString
+    | NoticeMessage Notice
     | ByeClient B.ByteString
     | KickClient ClientIndex
     | KickRoomClient ClientIndex
@@ -103,6 +104,10 @@
     chan <- client's sendChan
     processAction $ AnswerClients [chan] ["WARNING", msg]
 
+processAction (NoticeMessage n) = do
+    chan <- client's sendChan
+    processAction $ AnswerClients [chan] ["NOTICE", B.pack . show . fromEnum $ n]
+
 processAction (ByeClient msg) = do
     (Just ci) <- gets clientIndex
     rnc <- gets roomsClients