3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Users: fix issues

This commit is contained in:
Pragmatic Software 2020-01-25 14:31:10 -08:00
parent 7322906e5d
commit 3e031f3874

View File

@ -388,7 +388,7 @@ sub userset {
($channel, $hostmask) = $self->find_user_account($channel, $hostmask);
my $result = $self->{users}->set($channel, $hostmask, $key, $value);
$result =~ s/^password => .*;$/password => <private>;/m;
$result =~ s/^password => .*;?$/password => <private>;/m;
return $result;
}
@ -438,9 +438,11 @@ sub mycmd {
if (not $u) {
$channel = '.*';
$hostmask = "$nick!*\@*";
$u = $self->add_user("my_$nick", $channel, $hostmask);
$u->{autologin} = 1;
$u = $self->add_user("my_$nick", $channel, $hostmask, undef, undef, 1);
$u->{loggedin} = 1;
$u->{stayloggedin} = 1;
$u->{autologin} = 1;
$self->save;
}
if (defined $value and $u->{level} == 0) {
@ -450,10 +452,9 @@ sub mycmd {
}
}
($channel, $hostmask) = $self->find_user_account($channel, $hostmask);
my $result = $self->{users}->set($channel, $hostmask, $key, $value);
$result =~ s/^password => .*;$/password => <private>;/m;
$result =~ s/^password => .*;?$/password => <private>;/m;
return $result;
}