mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 05:49:27 +01:00
NickList: NAMREPLY: ensure $hostmask is defined
This commit is contained in:
parent
3f4c85bcdc
commit
aca793928a
@ -271,10 +271,13 @@ sub on_namreply {
|
|||||||
$self->add_nick($channel, $stripped_nick);
|
$self->add_nick($channel, $stripped_nick);
|
||||||
|
|
||||||
my ($account_id, $hostmask) = $self->{pbot}->{messagehistory}->{database}->find_message_account_by_nick($stripped_nick);
|
my ($account_id, $hostmask) = $self->{pbot}->{messagehistory}->{database}->find_message_account_by_nick($stripped_nick);
|
||||||
my ($user, $host) = $hostmask =~ m/[^!]+!([^@]+)@(.*)/;
|
|
||||||
$self->set_meta($channel, $stripped_nick, 'hostmask', $hostmask);
|
if (defined $hostmask) {
|
||||||
$self->set_meta($channel, $stripped_nick, 'user', $user);
|
my ($user, $host) = $hostmask =~ m/[^!]+!([^@]+)@(.*)/;
|
||||||
$self->set_meta($channel, $stripped_nick, 'host', $host);
|
$self->set_meta($channel, $stripped_nick, 'hostmask', $hostmask);
|
||||||
|
$self->set_meta($channel, $stripped_nick, 'user', $user);
|
||||||
|
$self->set_meta($channel, $stripped_nick, 'host', $host);
|
||||||
|
}
|
||||||
|
|
||||||
if ($nick =~ m/\@/) {
|
if ($nick =~ m/\@/) {
|
||||||
$self->set_meta($channel, $stripped_nick, '+o', 1);
|
$self->set_meta($channel, $stripped_nick, '+o', 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user