mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 03:33:06 +01:00
Users: fix issues
This commit is contained in:
parent
7322906e5d
commit
3e031f3874
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user