mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +01:00
Clear current NickServ account when logged out
This commit is contained in:
parent
b5b513fb77
commit
0a8cef3c2a
@ -907,7 +907,7 @@ sub check_bans {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($self->whitelisted($baninfo->{channel}, $baninfo->{banmask}, 'ban') || $self->whitelisted($baninfo->{channel}, $mask, 'user')) {
|
if($self->whitelisted($baninfo->{channel}, $baninfo->{banmask}, 'ban') || $self->whitelisted($baninfo->{channel}, $mask, 'user')) {
|
||||||
$self->{pbot}->{logger}->log("anti-flood: [check-bans] $mask [$alias] evaded $baninfo->{banmask} in $baninfo->{channel}, but allowed through whitelist\n");
|
#$self->{pbot}->{logger}->log("anti-flood: [check-bans] $mask [$alias] evaded $baninfo->{banmask} in $baninfo->{channel}, but allowed through whitelist\n");
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1107,6 +1107,9 @@ sub on_accountnotify {
|
|||||||
|
|
||||||
if ($event->{event}->{args}[0] eq '*') {
|
if ($event->{event}->{args}[0] eq '*') {
|
||||||
$self->{pbot}->{logger}->log("$event->{event}->{from} logged out of NickServ\n");
|
$self->{pbot}->{logger}->log("$event->{event}->{from} logged out of NickServ\n");
|
||||||
|
my ($nick, $user, $host) = $event->{event}->{from} =~ m/^([^!]+)!([^@]+)@(.*)/;
|
||||||
|
my $message_account = $self->{pbot}->{messagehistory}->{database}->get_message_account($nick, $user, $host);
|
||||||
|
$self->{pbot}->{messagehistory}->{database}->set_current_nickserv_account($message_account, '');
|
||||||
} else {
|
} else {
|
||||||
$self->{pbot}->{logger}->log("$event->{event}->{from} logged into NickServ account $event->{event}->{args}[0]\n");
|
$self->{pbot}->{logger}->log("$event->{event}->{from} logged into NickServ account $event->{event}->{args}[0]\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user