# HG changeset patch
# User unc0rr
# Date 1267597684 0
# Node ID 2f4320a1b31f13c9bf168777472569aac7eb04ff
# Parent  31f8d418ced3d153b5d6085413f6d0bf8476b1ec
Fix server for 0.9.12 (tested)

diff -r 31f8d418ced3 -r 2f4320a1b31f 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!"]