--- a/gameServer/HWProtoInRoomState.hs Mon Jun 21 16:52:14 2010 +0200
+++ b/gameServer/HWProtoInRoomState.hs Mon Jun 21 21:41:14 2010 +0400
@@ -6,6 +6,7 @@
import Data.Sequence(Seq, (|>), (><), fromList, empty)
import Data.List
import Maybe
+import qualified Data.ByteString.Char8 as B
--------------------------------------
import CoreTypes
import Actions
@@ -20,12 +21,10 @@
s <- roomOthersChans
return [AnswerClients s ["CHAT", n, msg]]
+handleCmd_inRoom ["PART"] = return [MoveToLobby "part"]
+handleCmd_inRoom ["PART", msg] = return [MoveToLobby $ "part: " `B.append` msg]
+
{-
-handleCmd_inRoom clID clients rooms ["PART"] =
- [RoomRemoveThisClient "part"]
- where
- client = clients IntMap.! clID
-
handleCmd_inRoom clID clients rooms ("CFG" : paramName : paramStrs)
| null paramStrs = [ProtocolError "Empty config entry"]
@@ -194,6 +193,5 @@
where
client = clients IntMap.! clID
engineMsg = toEngineMsg $ 'b' : ((nick client) ++ "(team): " ++ msg ++ "\x20\x20")
-
-handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"]
--}
\ No newline at end of file
+-}
+handleCmd_inRoom _ = return [ProtocolError "Incorrect command (state: in room)"]