mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 10:59:29 +01:00
Use NickList instead of MessageHistory for target channels
This commit is contained in:
parent
800b097a34
commit
559b9ddde1
@ -277,8 +277,8 @@ sub on_departure {
|
|||||||
|
|
||||||
if($text =~ m/^QUIT/) {
|
if($text =~ m/^QUIT/) {
|
||||||
# QUIT messages must be dispatched to each channel the user is on
|
# QUIT messages must be dispatched to each channel the user is on
|
||||||
my @channels = $self->{pbot}->{messagehistory}->{database}->get_channels($message_account);
|
my $channels = $self->{pbot}->{nicklist}->get_channels($nick);
|
||||||
foreach my $chan (@channels) {
|
foreach my $chan (@$channels) {
|
||||||
next if $chan !~ m/^#/;
|
next if $chan !~ m/^#/;
|
||||||
$self->{pbot}->{messagehistory}->add_message($message_account, "$nick!$user\@$host", $chan, $text, $self->{pbot}->{messagehistory}->{MSG_DEPARTURE});
|
$self->{pbot}->{messagehistory}->add_message($message_account, "$nick!$user\@$host", $chan, $text, $self->{pbot}->{messagehistory}->{MSG_DEPARTURE});
|
||||||
}
|
}
|
||||||
@ -308,8 +308,8 @@ sub on_nickchange {
|
|||||||
|
|
||||||
my $message_account = $self->{pbot}->{messagehistory}->{database}->get_message_account($nick, $user, $host);
|
my $message_account = $self->{pbot}->{messagehistory}->{database}->get_message_account($nick, $user, $host);
|
||||||
$self->{pbot}->{messagehistory}->{database}->devalidate_all_channels($message_account, $self->{pbot}->{antiflood}->{NEEDS_CHECKBAN});
|
$self->{pbot}->{messagehistory}->{database}->devalidate_all_channels($message_account, $self->{pbot}->{antiflood}->{NEEDS_CHECKBAN});
|
||||||
my @channels = $self->{pbot}->{messagehistory}->{database}->get_channels($message_account);
|
my $channels = $self->{pbot}->{nicklist}->get_channels($nick);
|
||||||
foreach my $channel (@channels) {
|
foreach my $channel (@$channels) {
|
||||||
next if $channel !~ m/^#/;
|
next if $channel !~ m/^#/;
|
||||||
$self->{pbot}->{messagehistory}->add_message($message_account, "$nick!$user\@$host", $channel, "NICKCHANGE $newnick", $self->{pbot}->{messagehistory}->{MSG_NICKCHANGE});
|
$self->{pbot}->{messagehistory}->add_message($message_account, "$nick!$user\@$host", $channel, "NICKCHANGE $newnick", $self->{pbot}->{messagehistory}->{MSG_NICKCHANGE});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user