mIRC Home    About    Download    Register    News    Help

Print Thread
selected nick ban via nicklist #24151 14/05/03 04:17 AM
Joined: Apr 2003
Posts: 426
neophyte Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Code:
alias sb {
  if (# ischan) && ($snick(#,0) > 0) {
    if ($me isop #) {
      var %a = $snick(#,0)
      var %b = 0
      echo $colour(join) $chan $chr(032)  $+ $chr(149) $+ $chr(160) $+ $chr(160) $+ $chr(160) $+  (kick/ban)  $+ %a $+  user(s) from $chan
      while (%a > %b) { 
        inc %b
        if ($1- == $null) {
          ban -u120 # $snick(#,%b) 3
          kick # $snick(#,%b)
          halt
        }
        if ($1- != $null) {
          ban -u120 # $snick(#,%b) 3
          kick # $snick(#,%b) $$1-
        }
      }
    }
  }
}



Ok, above I have my selected nick banner. However, what I want to do, is to stop mIRC from applying those modes individually, instead, to apply as many of them in the one mode +b command as possible (to reduce lag).

I am not exactly to sure how it would go... but if someone could help me out, that would be greatly appreciated.

Cheers.


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: selected nick ban via nicklist #24152 14/05/03 04:45 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
alias sb {
if ($snick(#,0)) && ($me isop #) {
var %a = $snick(#,0),%b,%c
echo $colour(join) $chan $chr(032)  $+ $chr(149) $+ $chr(160) $+ $chr(160) $+ $chr(160) $+  (kick/ban)  $+ %a $+  user(s) from $chan
while (%a) {
%b = %b $address($snick(#,%a),3)
%c = $addtok(%c,$snick(#,%a),44)
if ($numtok(%b,32) == $modespl) || (%a == 1) { mode # +bbbbbb %b | kick # %c $1- | .timer 1 120 if ($me isop #) mode # -bbbbbb %b | var %b,%c }
dec %a
}
}
}
note that u need the IAL of the channel, so, /who #chan


Re: selected nick ban via nicklist #24153 14/05/03 05:10 AM
Joined: Apr 2003
Posts: 426
neophyte Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
that is only kicking one of the selected nicks. not every one of them.

it is also displaying the ban list.

Last edited by neophyte; 14/05/03 05:13 AM.

--------
mIRC - fun for all the family (except grandma and grandpa)
Re: selected nick ban via nicklist #24154 14/05/03 05:41 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
alias sb {
if ($snick(#,0)) && ($me isop #) {
var %a = $snick(#,0),%b,%c
echo $colour(join) $chan $chr(032)  $+ $chr(149) $+ $chr(160) $+ $chr(160) $+ $chr(160) $+  (kick/ban)  $+ %a $+  user(s) from $chan
while (%a) {
%b = $addtok(%b,$address($snick(#,%a),3),32)
%c = $addtok(%c,$snick(#,%a),44)
if ($numtok(%b,32) == $modespl) || (%a == 1) { mode # $+(+,$str(b,$numtok(%b,32))) %b | kick # %c $1- | .timer 1 120 if ($me isop #) mode # $+(-,$str(b,$numtok(%b,32))) %b | var %b,%c }
dec %a
}
}
}

Re: selected nick ban via nicklist #24155 14/05/03 07:02 AM
Joined: Apr 2003
Posts: 426
neophyte Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
its still only kicking one user even though i have more than one user selected.


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: selected nick ban via nicklist #24156 15/05/03 12:50 PM
Joined: May 2003
Posts: 3
U
uLiKo Offline
Self-satisified door
Offline
Self-satisified door
U
Joined: May 2003
Posts: 3
Code:
sb {
  if ($me isop $active) && ($snicks) {
    tokenize 44 $snicks
    while ($1) {
      echo -a $1-
      var %o = $modespl,%hosts
      while (%o) { %hosts = %hosts $address($($+($,%o),2),2) | dec %o }
      mode $active $+(+,$str(b,$iif($0 < $modespl,$0,$modespl))) %hosts
      tokenize 32 $($+($,$calc($modespl +1),-),2)
    }
    tokenize 44 $snicks
    while ($1) {
      kick $active $1 Banned
      tokenize 32 $2-
    }
  }
} 

Re: selected nick ban via nicklist #24157 16/05/03 03:27 AM
Joined: Apr 2003
Posts: 426
neophyte Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
*edit* nm... fixed the issue

Last edited by neophyte; 16/05/03 04:36 AM.

--------
mIRC - fun for all the family (except grandma and grandpa)