mass voice/devoice for a bot

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

mass voice/devoice for a bot

Postby vodkaplayer » Mon Aug 18, 2008 3:35 pm

this code allow massvoice/devoice and the use of wildcard match (case sensitive)
it voice only voiced or regular users without affecting @ops
3 kind of wildcard (left, right, middle) eg.

!voice *bot or *bot* or bot*
!voice * would voice everyone except opérator..
!devoice *wildmatch *wildmatch* wildmatch* directmatch
you can specify unlimited wildcard token all will be voiced if they matche nicks.

Code: Select all
on $@*:TEXT:/^!((voice|devoice))/:#: {
  var %p = $replacex($regml(1),voice,+r,devoice,-v)
  if (!$nick($chan,0,$right(%p,1))) { notice $nick No user to $regml(1) on $chan $+ . | return }
  if ($2 == *) && (!$3) { var %i = 1 | while ($nick($chan,%i,$right(%p,1))) {
      var %n = %n $v1 | inc %i | if ($numtok(%n,32) == $modespl) {
        mode $chan $+($left(%p,1),$str(v,$v2)) %n | var %n
      }
    }
    if ($numtok(%n,32)) { mode $chan $+($left(%p,1),$str(v,$v1)) %n  }
  }
  else {
    var %x = $2-,%i = 1
    while ($gettok(%x,%i,32)) {
      if ($regex($v1,/^(\*?[^*]+\*?)$/)) {
        if (!$count($regml(1),*)) && ($nick($chan,$regml(1),$right(%p,1))) {
          var %n = $addtok(%n,$gettok(%x,%i,32),32)
        }
        else {
          var %w = 1 | while ($nick($chan,%w,$right(%p,1))) {
            if ($wildtokcs($v1,$regml(1),1,32)) { var %n = $addtok(%n,$v1,32)  } | inc %w
          }
        }
        if ($numtok(%n,32) == $modespl) { mode $chan $+($left(%p,1),$str(v,$v2)) %n | var %n }
      }
      inc %i
    }
    if ($numtok(%n,32)) { mode $chan $+($left(%p,1),$str(v,$v1)) %n }
  }
}


Have fun...
vodkaplayer
 

Re: mass voice/devoice for a bot

Postby Lukemob » Tue Sep 02, 2008 1:50 pm

This could bring even more take-overs :-/ But nice..
Lukemob
 

Re: mass voice/devoice for a bot

Postby Cristian » Fri Sep 12, 2008 8:35 pm

Nah takeovers aren't popular anymore :cry:

The script looks really nice, good job.
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: mass voice/devoice for a bot

Postby Lukemob » Fri Sep 26, 2008 4:28 pm

I will become one. And create T/O cr3w :twisted: :)
Lukemob
 

Re: mass voice/devoice for a bot

Postby zLOLCOPT3R » Fri Sep 26, 2008 4:30 pm

Lukemob wrote:I will become one. And create T/O cr3w :twisted: :)




You go girl! (Y)
zLOLCOPT3R
 


Return to Mirc Scripting Snippets

Who is online

Users browsing this forum: No registered users and 1 guest

cron