Top

Yet another mass voice


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  8.0 (of 1 scores)
Date Added  Apr 10, 2009
Last Updated  Apr 10, 2009
Tags  mass  voice 

Description

Just a simple mass voice with explanation.

Grab the Code

alias mv {
  ; Was told to add this because some people might not know you need +o||+h to +v people.
  if (!$nick(#,$me,ho)) {
    echo -at *** You need to be either +o or +h in # to use /mv
  }
  else {
    ; Record total users
    var %a $nick(#,0)
    ; Loop through all users
    while (%a) {
      ; If the user isn't voice, add them to the list of users to be voiced
      if ($nick(#,%a) !isvoice #) var %b %b $nick(#,%a)
      ; Once the max users we can voice @ one time has been reached, send out the mode command and unvar the 'to-voice' list
      if ($numtok(%b,32) == $modespl) { mode # $+(+,$str(v,$modespl)) %b | var %b $null }
      ; Prepare to check the next user
      dec %a
    }
    ; While loop has ended, push out any remaining users in our 'to-voice' list. (if any)
    if (%b) mode # $+(+,$str(v,$numtok(%b,32))) %b
  }
}
 

Comments

  (15)  RSS
Kirby
Comments: 480
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 10, 2009 9:55 pm
Hi Shinu.

Code:
$gettok(%b,0,32)
is the same thing as
Code:
$numtok(%b,32)


Good code. Nice to see explanations to scripts => user friendly. :)
Shinu
Comments: 5
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 10, 2009 9:55 pm
Updated ;)

Thanks for the compliments :)
Kirby
Comments: 480
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 10, 2009 10:03 pm
You took Snippet #6000. :p
Shinu
Comments: 5
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 10, 2009 10:06 pm
Exactly. :D
napa182
Comments: 1,692
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 1:20 am
on
Code:
if ($nick(#,%a) !isvoice #) var %b %b $nick(#,%a)


you can make it
Code:
if ($nick(#,%a,r)) var %b %b $v1



Aucun50
Comments: 568
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 1:55 am
For once i get what napa did somewhat, looks nice and has descriptions.
Kirby
Comments: 480
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 3:00 pm
However napa, having levels above voice (operator, etc.) does not necessarily mean that you have voice. Though it works, it may not always be true.
napa182
Comments: 1,692
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 3:34 pm
why would you want to voice users with a higher lvl? Only people that should need a voice is users with no mode hence r
Kirby
Comments: 480
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 3:45 pm
I guess you are right..but how I interpreted "mass-voice" was voicing everyone in the channel including operators and above, besides the ones already are voiced. Logically speaking, I guess my theory makes no sense...
Blitzjager
Comments: 192
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 6:31 pm
I'd go with ,a,v.
napa182
Comments: 1,692
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 6:56 pm
? why ?
it's a bit pointless to voice someone that has mode +o, +h, +a, or +q.
Kirby
Comments: 480
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 8:05 pm
Quote:
it's a bit pointless to voice someone that has mode +o, +h, +a, or +q.
Yeah it is, but then it wouldn't fit the original purpose, "mass-voice". Unless, "mass-voice" is interpreted as "voicing many regulars who don't have voice". If so, the parameter 'r' is fine.
Prelude
Comments: 98
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 10:19 pm
wth nvm i forget wtf i was gunna say after editing...

Oh nvm i remember , yeah why the hell would anyone tink that EVERYONE in the channel would get +v? makes zero sense, it should be obvisou its only those with no modes....
Kirby
Comments: 480
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 11, 2009 10:32 pm
/me gives up.
bigrat2
Comments: 15
 
mIRC Snippet:  Yet another mass voice
Posted on Apr 18, 2009 3:09 am
Why just limit it to mass voice? Add functionality by making it do other modes too :)

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom