Fix server for 0.9.12 (tested)
authorunc0rr
Wed, 03 Mar 2010 06:28:04 +0000
changeset 2917 2f4320a1b31f
parent 2916 31f8d418ced3
child 2918 24d6dc579b47
Fix server for 0.9.12 (tested)
gameServer/HWProtoInRoomState.hs
--- 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!"]