Skip to content

Commit

Permalink
6.99: fixed a few bugs in server burst.
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper committed Mar 6, 2014
1 parent 0f8e351 commit 4fec4b5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions INDEV
Original file line number Diff line number Diff line change
Expand Up @@ -1922,5 +1922,11 @@ CHANGES:
added ->do_mode_string_local() which is the same as ->do_mode_string() except it doesn't tell other servers about the change.

98. not sure why but topic information was sent awkwardly between names list and RPL_ENDOF_NAMES.

99. fixed a few bugs in server burst.






2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.98
6.99
12 changes: 8 additions & 4 deletions lib/server/mine.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,20 @@ sub send_burst {
# first, send modes of this server.
fire_command($server, aum => v('SERVER'));
fire_command($server, acm => v('SERVER'));

$done{$server} = 1;
$done{v('SERVER')} = 1;

# don't send info for this server or the server we're sending to.
$done{$server} = 1;
$done{ v('SERVER') } = 1;

$do = sub {
my $serv = shift;

# already did this one.
return if $done{$serv};

# we learned about this server from the server we're sending to.
return if defined $serv->{source} && $serv->{source} == $server;

# we need to do the parent first.
if (!$done{$serv->{parent}} && $serv->{parent} != $serv) {
$do->($serv->{parent});
Expand All @@ -114,7 +118,7 @@ sub send_burst {
foreach my $user ($main::pool->users) {

# ignore users the server already knows!
next if $user->{server} == $server || $server->{sid} == $user->{source};
next if $user->{server} == $server || $user->{source} == $server;

fire_command($server, uid => $user);

Expand Down
4 changes: 2 additions & 2 deletions modules/Core.module/submodules/ServerCommands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ sub sid {

my $ref = {};
$ref->{$_} = shift @args foreach qw[parent sid time name proto ircd desc];
$ref->{source} = $server->{sid}; # source = SID we learned about the server from
$ref->{source} = $server; # source = server we learned about the server from

# do not allow SID or server name collisions
if ($main::pool->lookup_server($ref->{sid}) || $main::pool->lookup_server_name($ref->{name})) {
Expand All @@ -189,7 +189,7 @@ sub uid {

my $ref = {};
$ref->{$_} = shift @args foreach qw[server uid time modes nick ident host cloak ip real];
$ref->{source} = $server->{sid}; # source = SID we learned about the user from
$ref->{source} = $server; # source = server we learned about the user from
$ref->{location} = $server;
my $modestr = delete $ref->{modes};
# location = the server through which this server can access the user.
Expand Down

0 comments on commit 4fec4b5

Please sign in to comment.