mIRC Homepage
Posted By: milosh kline channel banlist - 27/02/04 08:25 PM
Good evening. I need to script a command that will kline channel ban list (all bans on some channel :tongue:). I don't know how to read bans into some variable or something, or maybe there's some other (better) way to do the job.
Also, bans are in format *!*@<ip> and I need to kline in format *@<ip>.

thanx!
Posted By: Collective Re: kline channel banlist - 27/02/04 08:35 PM
Something like:
Code:
raw 367:*:{
  if ( $2 == [color:green]#channel[/color] ) {
    kline $gettok($3,2,33) Banned on $ifmatch
  }
}

should work.

Type /mode [color:green]#channel b[/color] to start it.

You could also use the IBL if you're in the channel and have the ban list, loop through $ibl(#channel,n).
Posted By: milosh Re: kline channel banlist - 27/02/04 09:49 PM
Thank you, man... If anybody needs a code here it is (thanx to Collective):
Code:
  set %i 0
  :start
  if (%i == $ibl(#,0)) goto end
  inc %i
  kline $gettok($ibl(#,%i),2,33) Klined
  mode # -b $ibl(#,%i)
  goto start
  :end
  echo -s Banning of ban list on channel # is over.

Note: Not tested and not optimized!
© mIRC Discussion Forums