gameServer/HWProtoInRoomState.hs
changeset 2917 2f4320a1b31f
parent 2902 1566f05ca371
child 2928 0e95e0e24fd8
--- a/gameServer/HWProtoInRoomState.hs	Wed Mar 03 04:33:49 2010 +0000
+++ b/gameServer/HWProtoInRoomState.hs	Wed Mar 03 06:28:04 2010 +0000
@@ -43,7 +43,8 @@
         client = clients IntMap.! clID
 
 handleCmd_inRoom clID clients rooms ("ADD_TEAM" : name : color : grave : fort : voicepack : flag : difStr : hhsInfo)
-    | length hhsInfo /= 16 = []
+    | length hhsInfo == 15 && clientProto client < 30 = handleCmd_inRoom clID clients rooms ("ADD_TEAM" : name : color : grave : fort : voicepack : " " : flag : difStr : hhsInfo)
+    | length hhsInfo /= 16 = [ProtocolError "Corrupted hedgehogs info"]
     | length (teams room) == 6 = [Warning "too many teams"]
     | canAddNumber <= 0 = [Warning "too many hedgehogs"]
     | isJust findTeam = [Warning "There's already a team with same name in the list"]
@@ -67,10 +68,6 @@
         hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs
         newTeamHHNum = min 4 canAddNumber
 
-handleCmd_inRoom clID clients rooms ("ADD_TEAM" : name : color : grave : fort : voicepack : difStr : hhsInfo) =
-    handleCmd_inRoom clID clients rooms ("ADD_TEAM" : name : color : grave : fort : voicepack : "" : difStr : hhsInfo)
-
-
 handleCmd_inRoom clID clients rooms ["REMOVE_TEAM", teamName]
     | noSuchTeam = [Warning "REMOVE_TEAM: no such team"]
     | nick client /= teamowner team = [ProtocolError "Not team owner!"]