Subversion Repositories pyscrabble

Compare Revisions

Ignore whitespace Rev 40 → Rev 41

/trunk/debian/patches/series
2,3 → 2,4
about_close.patch
serverlist_timeout.patch
hosts.patch
max-players.patch
/trunk/debian/patches/max-players.patch
New file
0,0 → 1,42
From: Christian von Kietzell <christian@vonkietzell.de>
Bug-Debian: http://bugs.debian.org/633838
Forwarded: no
Description: Check whether an existing player is rejoining _before_
checking whether the maximum of players has been reached.
 
--- pyscrabble-1.6.2/pyscrabble/net/server.py 2011-07-14 19:32:42.000000000 +0200
+++ pyscrabble-fixed/pyscrabble/net/server.py 2011-07-14 19:35:50.000000000 +0200
@@ -936,21 +936,21 @@
client.denyJoinGame(command)
return
- if (game.getNumberOfPlayers() == constants.MAX_PLAYERS):
- command.setData( ServerMessage([GAME_FULL]) )
- command.setCommand( constants.GAME_JOIN_DENIED )
- client.denyJoinGame(command)
- return
-
p = self.clients[client].clone()
- if (game.isPaused() and not game.hasPlayer(p)):
- command.setData( ServerMessage([CANNOT_JOIN_STARTED]) )
- command.setCommand( constants.GAME_JOIN_DENIED )
- client.denyJoinGame(command)
- return
-
if not game.hasPlayer( p ):
+ if (game.getNumberOfPlayers() == constants.MAX_PLAYERS):
+ command.setData( ServerMessage([GAME_FULL]) )
+ command.setCommand( constants.GAME_JOIN_DENIED )
+ client.denyJoinGame(command)
+ return
+
+ if (game.isPaused()):
+ command.setData( ServerMessage([CANNOT_JOIN_STARTED]) )
+ command.setCommand( constants.GAME_JOIN_DENIED )
+ client.denyJoinGame(command)
+ return
+
game.addPlayer( p )
else:
game.removePending( p )
/trunk/debian/changelog
1,3 → 1,12
pyscrabble (1.6.2-7) unstable; urgency=low
 
* max-players.patch: Before denying a player from joining a game because
the maximum number of players has been reach, check whether the player
is rejoining a game he or she is already part of (Closes: #633838).
Thanks to Christian von Kietzell.
 
-- Magnus Holmgren <holmgren@debian.org> Fri, 11 Nov 2011 08:45:12 +0100
 
pyscrabble (1.6.2-6) unstable; urgency=low
 
* Move Python modules and scripts to /usr/share/games/pyscrabble/python