diff options
| author | David Phillips <david@sighup.nz> | 2018-01-03 21:00:26 +1300 | 
|---|---|---|
| committer | David Phillips <david@sighup.nz> | 2018-01-03 21:00:26 +1300 | 
| commit | 7cf64bea04e47930f75513740b597a3116161d35 (patch) | |
| tree | df4f589918ead4ab8794c6a807d25f2595dc056f | |
| parent | f16a784ddffd165e72cff2356bd74c6a8eb71a05 (diff) | |
| download | idalius-7cf64bea04e47930f75513740b597a3116161d35.tar.xz | |
Ignore ignored users in pm too, except admins
| -rwxr-xr-x | idalius.pl | 7 | 
1 files changed, 6 insertions, 1 deletions
| @@ -159,11 +159,16 @@ sub irc_public {  sub irc_msg {  	my ($who, $to, $what, $ided) = @_[ARG0 .. ARG3];  	my $nick = (split /!/, $who)[0]; +	my $is_admin = grep {$_ eq $who} @{$config{admins}}; + +	# reject ignored nicks who aren't also admins (prevent lockout) +	return if (grep {$_ eq $nick} @{$config{ignore}} and not $is_admin); +  	if ($config{must_id} && $ided != 1) {  		$irc->yield(privmsg => $nick => "You must identify with services");  		return;  	} -	return unless grep {$_ eq $who} @{$config{admins}}; +	return unless $is_admin;  	# FIXME this needs tidying. Some of this can be factored out, surely.  	if ($what =~ /^nick\s/) {  		my ($newnick) = $what =~ /^nick\s+(\S+)$/; | 
