Bot !commands for ops

By sailoreagle on Feb 08, 2004

A series of commands to load on a bot, that allow all ops in the channel to ban, kickban, set topic, etc. simply typing a !command.
Commands available are: !topic, !kick, !ban, !kickban, !mode, !op, !deop, !voice, !devoice, !voiceall, !devoiceall.
The latter two commands use $modespl, along with tokens and $str, to voice/devoice as many people as possible on the same line (to avoid the channel getting flooded by mode changes).

ON @*:TEXT:*:#: { 
  if ($nick isop $chan) { 
    if ($1 == !topic) { 
      topic $chan $2- 
    } 
    if ($1 == !kick) { 
      kick $chan $2 $3- 
    } 
    if ($1 == !ban) { 
      ban $chan $address($2,3) 
    } 
    if ($1 == !kickban) { 
      ban -k $chan $2 3 $3- 
    } 
    if ($1 == !mode) { 
      mode $chan $2- 
    } 
    if ($1 == !op) { 
      mode $chan +o $2 
    } 
    if ($1 == !deop) { 
      mode $chan -o $2 
    } 
    if ($1 == !voice) { 
      mode $chan +v $2 
    } 
    if ($1 == !devoice) { 
      mode $chan -v $2 
    } 
    if ($1 == !voiceall) { 
      var %v = $nick($chan,0,r) 
      while (%v) { 
        var %vn = %vn $nick($chan,%v,r) 
        if ($numtok(%vn,32) == $modespl) { 
          mode $chan $+(+,$str(v,$ifmatch)) 
          unset %vn 
        } 
        dec %v 
      } 
      if (%vn) { 
        mode $chan $+(+,$str(v,$numtok(%vn,32))) %vn 
      } 
    } 
    if ($1 == !devoiceall) { 
      var %v = $nick($chan,0,v) 
      while (%v) { 
        var %vn = %vn $nick($chan,%v,v) 
        if ($numtok(%vn,32) == $modespl) { 
          mode $chan $+(-,$str(v,$ifmatch)) 
          unset %vn 
        } 
        dec %v 
      } 
      if (%vn) { 
        mode $chan $+(-,$str(v,$numtok(%vn,32))) %vn 
      } 
    } 
  } 
}

Comments

Sign in to comment.
Gosy   -  Feb 24, 2011

.. or perhaps a timer on the triggers :) so it's not spammable

 Respond  
Jethro   -  Feb 24, 2011

You can try using the

if ($nick isowner $chan) {

or

if ($nick($chan($nick,o~)) {
 Respond  
Gosy   -  Feb 24, 2011

Would be nice if this script had a "owner" option, so that anyone who's op wouldn't spam this "triggers" as op :\

 Respond  
Reezy   -  May 17, 2009

Great, i needed this :D

 Respond  
~Sonny   -  Oct 16, 2008

rofl @ dodger. mmmmhm.

 Respond  
Bullet_Dodger   -  Oct 01, 2008

Hmm it would be nice for it to only be useable by nicks u set it to
like

if ($istok(<nick1> <nick2>,$nick,32)) { }
 Respond  
NightCrawler   -  Oct 19, 2007

Nice script you got here.

 Respond  
guest598594   -  Aug 22, 2007

zad0909, to see the max number, do //echo -a $modespl

 Respond  
guest598594   -  Aug 22, 2007

because a server has a set number of how many ppl you can dewhatever at a time, undernet is 6

gamefreak444, im not sure about that...youd have to see if the person if +q, but im not sure how

 Respond  
zad0909   -  Aug 22, 2007

For some reason mine will only devoice 4 or 5 voices.

Why is this?

 Respond  
GameFreak444   -  Aug 03, 2007

This scripts is for Ops right?
But how can I make it for Founders?

 Respond  
guest598594   -  Jul 14, 2007

I like it. Especially the !devoiceall and !voiceall. I think !deopall would be cool too.

 Respond  
[-Superboyz-]   -  Feb 06, 2005

Nice !!!

 Respond  
CoNvIcT   -  Jul 23, 2004

Good Work sailoreagle

 Respond  
UTUCS.com-Admin   -  Feb 22, 2004

Great Script!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.