/massdeop #channel

Paste Your small code(s) here, ex. small aliases, identifiers

/massdeop #channel

Postby Cristian » Sat Jul 11, 2009 11:58 pm

Usage: /massdeop #channel

it won't try to deop if nicknames length is one
it won't try to deop if nickname is your own

you can add you own if statements that suits you.

Code: Select all
alias massdeop {
  var %x = $nick($1,0,o)
  while (%x) {
    var %nickname = $nick($1,%x,o)
    if ($numtok(%users,32) == $modespl) && ($me isop $1) { .raw -q MODE $1 $str(-o,$modespl) %users | var %users }
    if ($check(%nickname)) { var %users = $addtok(%users,%nickname,32) }
    dec %x
  }
  if ($numtok(%users,32) > 0) { .raw -q MODE $1 $str(-o,$numtok(%users,32)) %users | var %users }
}
alias -l check {
  if ($len($1) == 1) { return $false }
  elseif ($1 iswm $me) { return $false }
  else { return $true }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: /massdeop #channel

Postby zNigel- » Sun Jul 12, 2009 12:03 am

Nice m8..

Looks really good and alot more advanced than i thought msl would ever be :x
zNigel-
 

Re: /massdeop #channel

Postby Cristian » Sun Jul 12, 2009 12:27 am

thanks mate
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: /massdeop #channel

Postby PuNkTuReD » Sun Jul 12, 2009 12:34 am

quick question

is $modespl a custom identifier?
PuNkTuReD
 

Re: /massdeop #channel

Postby Cristian » Sun Jul 12, 2009 12:43 am

no its mircs inbuilt identifier, it returns the maximum modechanges.

and on Quakenet its 6.

//echo -a $modespl
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: /massdeop #channel

Postby PuNkTuReD » Sun Jul 12, 2009 2:01 am

ahhhh noiiiiice
PuNkTuReD
 

Re: /massdeop #channel

Postby vodkaplayer » Sun Aug 23, 2009 5:21 pm

you can make it shorter and proper :)

you don't need to use a dot '.' in .raw -q, -q switch make it quiet already :<

Code: Select all
alias massdeop {
  if ($me !isop $1) { echo -a */massdeop: I'm not operator in $v2 | return }
  var %i = 1, %c = $1, %t
  while ($nick(%c,%i,o)) {
    var %v = $v1
    if ($len(%v) > 1) && (%v != $me) { var %n = $addtok(%n,%v,32) | inc %t } | inc %i
    if ($numtok(%n,32) == $modespl) { .mode %c $+(-,$str(o,$v2)) %n | var %n }
  }
  if ($numtok(%n,32)) { .mode %c $+(-,$str(o,$v1)) %n }
  echo -a deopped $iif(%t,%t,0) users from %c
}
vodkaplayer
 


Return to Mirc Scripting Snippets

Who is online

Users browsing this forum: No registered users and 1 guest

cron