… | |
… | |
82 | # try to identify any new games assigned to us. stupid protocol |
82 | # try to identify any new games assigned to us. stupid protocol |
83 | # first updates the game, joins you and THEN tells you that |
83 | # first updates the game, joins you and THEN tells you that |
84 | # which of the games you asked for this is. |
84 | # which of the games you asked for this is. |
85 | |
85 | |
86 | for (@$add) { |
86 | for (@$add) { |
87 | if ($_->is_playing ($self->{conn}{name}) |
87 | if ($_->player_colour ($self->{conn}{name}) |
88 | and my $game = shift @{$self->{new_game}}) { |
88 | and my $game = shift @{$self->{new_game}}) { |
89 | $game->inject_upd_game ({ game => $_ }); |
89 | $game->inject_upd_game ({ game => $_ }); |
90 | $game->set_channel ($game->{channel}); |
90 | $game->set_channel ($game->{channel}); |
91 | } |
91 | } |
92 | } |
92 | } |