Raw mode doesnt display ipv6 banmask - 25/01/22 08:25 PM
i was wondering why this small code to determine who was effected by bans doesnt detect ipv6 banmasks
for example:
+Simo Sets Mode on #test to: +b *!*@81.92.873.38
21:24:01 (1 User) is Banned Blynn
+Simo Sets Mode on #test to: +b *!*@2607:5300:60:21b::1
none here while its a valid ipv6 address of a nick on channel
Code
ON ^*:RAWMODE:#:{ echo -t $chan 12,08 $nick 1,15 Sets Mode on 5,15 $chan 1,15 to: 12,15 $strip($1-,bcru) var %b = $countcs($1,b,e,I,q),%y = 1 if (%b) { while (%y <= %b) { var %x = 1 while (%x <= $nick($chan,0)) { if (!$address($nick($chan,%x),5)) { } if ($remove($wildtok($2-,*!*@*,%y,32),~q:,~n:,~j:,m:,N:,B:,c:,G:,S:,c:,B:,u:) iswm $address($nick($chan,%x),5)) var %bl = %bl $nick($chan,%x) inc %x } inc %y } if (%bl) { var %i $query(0) | while (%i) { if ($istok(%bl,$query(%i),32)) echo -t $query(%i) 01,00 *** ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,Is,Are) effected 12 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t) 14 05 $1- | dec %i } | haltdef } if (%bl) { if ($me isin %bl && +q isin $1 ) { mode # set $replace($1-,+,-) } if ( +b isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) Banned 04,00 %bl if ( -b isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) UNBanned 04,00 %bl if ( +I isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) Invited 04,00 %bl if ( -I isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) UNInvited 04,00 %bl if ( +e isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) excempted 04,00 %bl if ( -e isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) UNexcempted 04,00 %bl if ( +q isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) MuteBanned 04,00 %bl if ( -q isin $gettok($1-,1,32)) echo $chan $timestamp 08,14 ( $+ $numtok(%bl,32) $iif($numtok(%bl,32) < 2,User,Users) $+ ) $iif($numtok(%bl,32) < 2,is,Are) UN-MuteBanned 04,00 %bl haltdef } } haltdef }
for example:
+Simo Sets Mode on #test to: +b *!*@81.92.873.38
21:24:01 (1 User) is Banned Blynn
+Simo Sets Mode on #test to: +b *!*@2607:5300:60:21b::1
none here while its a valid ipv6 address of a nick on channel