};
hook_print 'Disconnected', sub {
- my %servers = map { $_->{server} => 1 }
- grep { $_->{flags} & 9 and not($_->{flags} & 2) }
- get_list 'channels';
+ my %servers;
+ $servers{$_->{server}} = 1 for grep +($_->{flags} & 0b1011) == 0b1001,
+ get_list 'channels';
delete @users{ grep !$servers{$_}, keys %users};
delete @fetched{grep !$servers{$_}, keys %fetched};
};
hook_print 'Disconnected', sub {
- my %servers = map { $_->{server} => 1 }
- grep { $_->{flags} & 9 and not($_->{flags} & 2) }
- get_list 'channels';
+ my %servers;
+ $servers{$_->{server}} = 1 for grep +($_->{flags} & 0b1011) == 0b1001,
+ get_list 'channels';
delete @opers{grep !$servers{$_}, keys %opers};