Advertisement
westor

G-Lined user channel ban for ionli v4.0

Jan 18th, 2015
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.79 KB | None | 0 0
  1. ON !*:QUIT: {
  2.   if ($status !== connected) { return }
  3.   var %addr = $address($nick,2)
  4.   if (!%addr) { var %addr = $wildsite }
  5.   if (!%addr) { return }
  6.   var %chans = $comchans_get($nick)
  7.   if (!%chans) { return }
  8.   tokenize 32 $strip($1-,burci)
  9.   if (G-lined isin $1) {
  10.     var %t = $numtok(%chans,44)
  11.     var %i = 1
  12.     while (%i <= %t) {
  13.       var %c = $gettok(%chans,%i,44)
  14.       if ($me ison %c) { .msg X ban %c %addr Too many G-lines from ur host. ( $+ %addr $+ ) }
  15.       inc %i
  16.     }
  17.   }
  18. }
  19.  
  20. alias comchans_get {
  21.   if (!$1) { return }
  22.   var %t = $comchan($1,0)
  23.   if (!%t) { return 0 }
  24.   var %i = 1
  25.   while (%i <= %t) {
  26.     var %c = $comchan($1,%i)
  27.     if (%c) { var %tot = $addtok(%tot,%c,44) }
  28.     inc %i
  29.   }
  30.   if (%tot) { return %tot }
  31.   elseif (!%tot) { return 0 }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement