Greetingz gentz,

someone helped me with this rawmode code to display who got effected by various bans and extended bans as well as ipv6 banmasks i forgot who it was but thanks a lot for that as it works excellent except for it freezing client whenever multiple bans are set in a line like :

Quote


13:19:00 Falcon Sets Mode on #channel to: -bbbbbbbbbbbbbbb G:SV u:G:CO u:G:SG u:G:FI u:G:SE u:G:ES u:G:RU u:G:PR u:G:GR u:G:MU u:G:AZ u:G:BG u:G:RO u:G:AR u:G:LK

13:19:01 AutoBot Sets Mode on #channel to: +bbbbbbbbbbbbbbb G:SV u:G:CO u:G:SG u:G:FI u:G:SE u:G:ES u:G:RU u:G:PR u:G:GR u:G:MU u:G:AZ u:G:BG u:G:RO u:G:AR u:G:LK

13:19:03 Falcon Sets Mode on #channel to: -bbbbbbbbbbbbb u:G:CN u:G:IE u:G:SI u:G:BS u:G:FR u:G:NZ u:G:BR u:G:BB u:G:TR u:G:BT u:G:TH u:G:CZ u:G:ID

13:19:04 AutoBot Sets Mode on #channel to: +bbbbbbbbbbbbb u:G:CN u:G:IE u:G:SI u:G:BS u:G:FR u:G:NZ u:G:BR u:G:BB u:G:TR u:G:BT u:G:TH u:G:CZ u:G:ID




here is the code i use :

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)) {
        var %banmask = $wildtok($2-,*!*@*,%y,32) 
        if (~quiet:?* iswm %banmask) var %banmask $mid(%banmask,8)   
        if (~?:?* iswm %banmask) var %banmask $mid(%banmask,4) 
        if (?:?* iswm %banmask) var %banmask $mid(%banmask,3)
        if (%banmask 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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)   
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)     
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)   
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)     
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)   
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)     
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)   
      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 $regsubex(%bl,/(\S+)/g,( $+ \n $+ ) \t)     
      haltdef
    }
  }
  haltdef
}


Last edited by Simo; 13/09/22 11:52 AM.