diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-01-29 06:28:26 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-01-29 06:28:26 (GMT) |
commit | e97bad397dde9e8faa7a85eab53812106f940df7 (patch) | |
tree | f67dfb28fc4a54fda9ff3755a0a1ce5f5a641d6d /activity.py | |
parent | 38020714053864459b196935b2544c40ebc2335b (diff) |
Suppress wrong positions in players list OLPC#5242
Place current user at the end of players list all time.
Update current-player position after HELLO procedure
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/activity.py b/activity.py index f6f3186..9b15453 100644 --- a/activity.py +++ b/activity.py @@ -234,17 +234,14 @@ class MemorizeActivity(Activity): _logger.debug('Joined an existing shared activity') - self.found = 0 for buddy in self._shared_activity.get_joined_buddies(): - _logger.debug("buddy joined - _joined_cb: %s (get buddies of activity and add them to my list)", buddy.props.nick) - self.game.add_buddy(buddy) - if buddy == self.owner: - self.found = 1 - - if self.found == 0: - _logger.debug("buddy joined - _joined_cb: Not foud myself in buddy list - will add myself at end of the list.") - self.game.add_buddy(self.owner) + if buddy != self.owner: + _logger.debug("buddy joined - _joined_cb: %s " + "(get buddies of activity and add them to my list)", + buddy.props.nick) + self.game.add_buddy(buddy) + self.game.add_buddy(self.owner) self.initiating = False self._sharing_setup() |