mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Add stayloggedin
field to admin accounts to prevent logging out when /parting or /quitting
This commit is contained in:
parent
06d6e0f0d4
commit
386e03c184
@ -292,7 +292,7 @@ sub on_departure {
|
|||||||
$self->{pbot}->{messagehistory}->{MSG_DEPARTURE});
|
$self->{pbot}->{messagehistory}->{MSG_DEPARTURE});
|
||||||
|
|
||||||
my $admin = $self->{pbot}->{admins}->find_admin($channel, "$nick!$user\@$host");
|
my $admin = $self->{pbot}->{admins}->find_admin($channel, "$nick!$user\@$host");
|
||||||
if(defined $admin and $admin->{loggedin}) {
|
if(defined $admin and $admin->{loggedin} and not $admin->{stayloggedin}) {
|
||||||
$self->{pbot}->{logger}->log("Whoops, $nick left while still logged in.\n");
|
$self->{pbot}->{logger}->log("Whoops, $nick left while still logged in.\n");
|
||||||
$self->{pbot}->{logger}->log("Logged out $nick.\n");
|
$self->{pbot}->{logger}->log("Logged out $nick.\n");
|
||||||
delete $admin->{loggedin};
|
delete $admin->{loggedin};
|
||||||
|
Loading…
Reference in New Issue
Block a user