--- a/gameServer/HWProtoInRoomState.hs Wed Dec 04 12:28:04 2013 +0100
+++ b/gameServer/HWProtoInRoomState.hs Thu Dec 05 00:51:27 2013 +0400
@@ -43,6 +43,7 @@
else
r{params = Map.insert paramName paramStrs (params r)}
+
handleCmd_inRoom ("ADD_TEAM" : tName : color : grave : fort : voicepack : flag : difStr : hhsInfo)
| length hhsInfo /= 16 = return [ProtocolError $ loc "Corrupted hedgehogs info"]
| otherwise = do
@@ -290,6 +291,9 @@
if illegalName newName then
[Warning $ loc "Illegal room name"]
else
+ if isSpecial rm then
+ [Warning $ loc "Restricted"]
+ else
if isJust $ find (\r -> newName == name r) rs then
[Warning $ loc "Room with such name already exists"]
else
@@ -331,7 +335,7 @@
(master || serverAdmin)
&& isJust maybeClientId
&& ((newAdminId /= thisClientId) || (serverAdmin && not master))
- && (newAdminId /= thisRoomMasterId)
+ && (Just newAdminId /= thisRoomMasterId)
&& sameRoom]
@@ -362,6 +366,11 @@
s <- roomClientsChans
return [AnswerClients s ["CHAT", n, B.unwords $ "/rnd" : rs], Random s rs]
+handleCmd_inRoom ["FIX"] = do
+ cl <- thisClient
+ return [ModifyRoom (\r -> r{isSpecial = True}) | isAdministrator cl]
+
+
handleCmd_inRoom ["LIST"] = return [] -- for old clients (<= 0.9.17)
handleCmd_inRoom (s:_) = return [ProtocolError $ "Incorrect command '" `B.append` s `B.append` "' (state: in room)"]