From: Doug Freed Date: Fri, 21 Aug 2020 16:25:18 +0000 (+0000) Subject: bansearch: various fixes and improvements X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=3727d205836165e98cd1dea35ee42a85d29cd325;p=irssi-scripts.irssi.org.git bansearch: various fixes and improvements * Adjust set-by-server check to not be freenode-specific * Make $~a check work * Add $a check * Make $x check work for all cases --- diff --git a/scripts/bansearch.pl b/scripts/bansearch.pl index df54718..49fd606 100644 --- a/scripts/bansearch.pl +++ b/scripts/bansearch.pl @@ -5,7 +5,7 @@ use Irssi; use Irssi::Irc; use vars qw($VERSION %IRSSI); -$VERSION = "1.2"; +$VERSION = "1.3"; %IRSSI = ( authors => 'Nathan Handler, Joseph Price', contact => 'nathan.handler@gmail.com, pricechild@ubuntu.com', @@ -106,7 +106,7 @@ sub RPL_BANLIST { $maskreg=~s/\*/\.\*\?/g; #We only want to display who set the ban/quiet if it is listed as a person - if($setby=~m/^.*?\.freenode\.net$/i) { + if($setby=~m/^[^!.]+\.[^!]+$/i) { $setby=''; } else { @@ -138,6 +138,17 @@ sub RPL_BANLIST { } # any logged-in user if($maskreg=~m/^\$a$/i) { + if($account!~m/^0$/) { + Irssi::active_win()->print( + "$type against \x02$mask\x02 in $banchannel matches identified user." . $setby); + $issues++; + } + else { +# Irssi::active_win()->print("$type against \x02$mask\x02 does NOT match $account" . $setby); + } + } + # any unidentified user + if($maskreg=~m/^\$\~a$/i) { if($account=~m/^0$/) { Irssi::active_win()->print( "$type against \x02$mask\x02 in $banchannel matches unidentified user." . $setby); @@ -160,7 +171,7 @@ sub RPL_BANLIST { } # full match if($maskreg=~m/^\$x:(.*?)$/i) { - my $full = "$nick!user\@host\#$real"; + my $full = "$nick!$user\@$host\#$real"; if($full=~m/^$1$/i) { Irssi::active_win()->print( "$type against \x02$mask\x02 in $banchannel matches $full" . $setby);