# HG changeset patch # User unc0rr # Date 1224186491 0 # Node ID a734715a777a189a76e93034ea1b4261c2365cfe # Parent e1aaa1a4901f8fb3e6b8881b8bdc61580a0b092a - Frontend: don't reset playing teams list after end of round - Server: same + don't allow team adding while round in progress diff -r e1aaa1a4901f -r a734715a777a QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu Oct 16 16:57:51 2008 +0000 +++ b/QTfrontend/hwform.cpp Thu Oct 16 19:48:11 2008 +0000 @@ -278,7 +278,7 @@ if (editedTeam) { curTeamSelWidget->addTeam(*editedTeam); } - } else { + } else if(lastid != ID_PAGE_GAMESTATS && lastid != ID_PAGE_INGAME) { curTeamSelWidget->resetPlayingTeams(teamsList); } } diff -r e1aaa1a4901f -r a734715a777a netserver/HWProto.hs --- a/netserver/HWProto.hs Thu Oct 16 16:57:51 2008 +0000 +++ b/netserver/HWProto.hs Thu Oct 16 19:48:11 2008 +0000 @@ -34,7 +34,7 @@ where toAnswer (paramName, paramStrs) = (clientOnly, "CONFIG_PARAM" : paramName : paramStrs) -answerCantAdd = [(clientOnly, ["WARNING", "Too many teams or hedgehogs, or same name team"])] +answerCantAdd = [(clientOnly, ["WARNING", "Too many teams or hedgehogs, or same name team, or round in progress"])] answerTeamAccepted team = [(clientOnly, ["TEAM_ACCEPTED", teamname team])] answerAddTeam team = [(othersInRoom, teamToNet team)] answerHHNum teamName hhNumber = [(othersInRoom, ["HH_NUM", teamName, show hhNumber])] @@ -157,7 +157,7 @@ handleCmd_inRoom client _ rooms ("ADD_TEAM" : name : color : grave : fort : difStr : hhsInfo) | length hhsInfo == 16 = - if length (teams clRoom) == 6 || canAddNumber <= 0 || isJust findTeam then + if length (teams clRoom) == 6 || canAddNumber <= 0 || isJust findTeam || gameinprogress clRoom then (noChangeClients, noChangeRooms, answerCantAdd) else (noChangeClients, modifyRoom clRoom{teams = teams clRoom ++ [newTeam]}, answerTeamAccepted newTeam ++ answerAddTeam newTeam ++ answerTeamColor name color) @@ -222,7 +222,7 @@ handleCmd_inRoom client _ rooms ["ROUNDFINISHED"] = if isMaster client then - (noChangeClients, modifyRoom clRoom{teams = [], gameinprogress = False}, []) + (noChangeClients, modifyRoom clRoom{gameinprogress = False}, []) else (noChangeClients, noChangeRooms, []) where