mIRC Home    About    Download    Register    News    Help

Print Thread
#169298 21/01/07 08:30 AM
Joined: Aug 2006
Posts: 60
S
Babel fish
OP Offline
Babel fish
S
Joined: Aug 2006
Posts: 60
Here's a line in my nicklist popup(probably wordwrapped):

.$iif($2 != $null,Voice,$iif(!$nick($chan,$1,a,v),Voice)) : massmode $chan +v 1 $snicks

I want the Voice option to show if:
-I have selected more than one nick
OR
-The one nick I have selected does not have voice.

What happens instead is that it does not appear when I select more than one nick, and always appears when I select just one nick. Help please smile

Joined: Dec 2006
Posts: 80
Babel fish
Offline
Babel fish
Joined: Dec 2006
Posts: 80
The $snick identifier doesnt sort out voiced nicks from non-voiced nicks for some reason. $snick($chan,0,a,v) seems to fit but doesn't work here for one reason or another.

Give this a try:

Code:
 
.$iif($svnicks,Voice): massmode $chan +v 1 $svnicks



Here is a custom alias for your alias section called $svnicks that will sort them out and do what youre looking for...

Code:
 
/svnicks {
  var %b = 1, %a
  while (%b <= $snick($chan,0)) {
    if ($snick($chan,%b) !isvoice $chan) var %a = $addtok(%a,$snick($chan,%b),44)
    inc %b
  }
  return %a
}



Im not sure what your massmode alias looks like but it should work the same for this $svnicks alias as it would for $snicks because $chr(44), the comma, still seperates the tokens like $snicks does. You would just have to identify $svnicks as the string of names to 'voice' in your massmode alias...



Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
Scripto #169360 22/01/07 12:53 AM
Joined: Aug 2006
Posts: 60
S
Babel fish
OP Offline
Babel fish
S
Joined: Aug 2006
Posts: 60
Ahh I see...nice. Thanks!


Link Copied to Clipboard