netserver/HWProto.hs
changeset 1322 c624b04699fb
parent 1321 d7dc4e86201e
child 1323 d166f9069c2b
equal deleted inserted replaced
1321:d7dc4e86201e 1322:c624b04699fb
   110 handleCmd_noRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd)
   110 handleCmd_noRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd)
   111 
   111 
   112 
   112 
   113 -- 'inRoom' clients state command handlers
   113 -- 'inRoom' clients state command handlers
   114 handleCmd_inRoom :: CmdHandler
   114 handleCmd_inRoom :: CmdHandler
   115 handleCmd_inRoom client _ _ ["CHAT_STRING", _, msg] =
   115 handleCmd_inRoom client _ _ ["CHAT_STRING", msg] =
   116 	(noChangeClients, noChangeRooms, answerChatString (nick client) msg)
   116 	(noChangeClients, noChangeRooms, answerChatString (nick client) msg)
   117 
   117 
   118 handleCmd_inRoom client _ rooms ("CONFIG_PARAM":paramName:paramStrs) =
   118 handleCmd_inRoom client _ rooms ("CONFIG_PARAM":paramName:paramStrs) =
   119 	if isMaster client then
   119 	if isMaster client then
   120 		(noChangeClients, modifyRoom clRoom{params = Map.insert paramName paramStrs (params room)}, answerConfigParam paramName paramStrs)
   120 		(noChangeClients, modifyRoom clRoom{params = Map.insert paramName paramStrs (params clRoom)}, answerConfigParam paramName paramStrs)
   121 	else
   121 	else
   122 		(noChangeClients, noChangeRooms, answerNotMaster)
   122 		(noChangeClients, noChangeRooms, answerNotMaster)
   123 	where
   123 	where
   124 		clRoom = roomByName (room client) rooms
   124 		clRoom = roomByName (room client) rooms
   125 
   125 
   126 
       
   127 handleCmd_inRoom client _ _ ("ADDTEAM" : name : color : grave : fort : difStr : hhsInfo)
   126 handleCmd_inRoom client _ _ ("ADDTEAM" : name : color : grave : fort : difStr : hhsInfo)
   128 	| length hhsInfo == 16 = (noChangeClients, noChangeRooms, answerBadCmd)
   127 	| length hhsInfo == 16 = (noChangeClients, noChangeRooms, answerBadCmd)
   129 
   128 
   130 handleCmd_inRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd)
   129 handleCmd_inRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd)