Skip to content

Commit

Permalink
Fix a typo that caused some captain games to be broken because of a m…
Browse files Browse the repository at this point in the history
…issing soldier.

	modified:   pug.py
  • Loading branch information
root authored and jdcaron committed Aug 6, 2012
1 parent 42de8c2 commit f080b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pug.py
Expand Up @@ -53,7 +53,7 @@ def add(userName, userCommand, ninjAdd = 0):
userList[userName] = createUser(userName, userCommand, userAuthorizationLevel)
printUserList()
if len(userList) >= (getTeamSize() * 2) and classCount('medic') > 1:
if classCount('demo') < 2 or classCount('scout') < 4 or classCount('soldier') < 3:
if classCount('demo') < 2 or classCount('scout') < 4 or classCount('soldier') < 4:
return 0
if state == 'captain' and countCaptains() < 2:
send("PRIVMSG " + config.channel + " :\x037,01Warning!\x030,01 This PUG need 2 captains to start.")
Expand Down Expand Up @@ -1585,7 +1585,7 @@ def updateUserStatus(nick, escapedUserCommand):
userList[nick]['last'] = time.time()
if nick in awayList:
del awayList[nick]
if (state == 'captain' or state == 'normal') and (classCount('demo') < 2 or classCount('scout') < 4 or classCount('soldier') < 3):
if (state == 'captain' or state == 'normal') and (classCount('demo') < 2 or classCount('scout') < 4 or classCount('soldier') < 4):
return 0
if len(userList) >= numberOfPlayers and len(awayList) == 0 and classCount('medic') >= numberOfMedics:
initGame()
Expand Down

0 comments on commit f080b6f

Please sign in to comment.