mIRC Home    About    Download    Register    News    Help

Print Thread
R
RusselB
RusselB
R
If I'm on a channel that has 2 people on it, and they have modes @ and +, only the @ shows in the display, but if I use
Code:
//echo -a $nick(#chan,0,@) $nick(#chan,0,+)

I get
Quote:
2 2

If I do
Code:
//echo -a $nick(#chan,0,@,+) $nick(#chan,0,+,@)

I get
Quote:
0 0


What I want is to get the count to show like
Quote:
2 0


A count of the highest level shown (and asked for in the script).

I hope that this makes sense. If it doesn't I apologize, but I'm unable to think of a better way to word it.

Joined: Feb 2006
Posts: 523
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
if you're hardcoding it into a script, then of course you'd just use $nick(#chan,0,@,+) and $nick(#chan,0,+). otherwise, here's a small demonstration of how i'd do it:

Code:
var %z = 1
while ($mid($prefix,%z,1)) {
  echo -a $v1 : $nick(#,0,$v1,$gettok(x $prefix x,1,$asc($v1)))
  inc %z
}


just added the x`s to make sure a null/wrong parameter was never passed, they wont have any effect smile. the idea here is to isolate all the modes before the current one in $prefix, and ensure we dont count them with it

D
DJ_Sol
DJ_Sol
D
Check out the pnick property. $nick($chan,1).pnick

Also, I dont really use these but in mirc help file its listed as:

a = all nicks, o = ops, h = halfops, v = voiced, r = regular

R
RusselB
RusselB
R
The @ + combination was just being used as an example. In the code I'll be wanting to return counts for the following characters: ~,&,@,&,+

Making some slight modifications to your code, jaytea (and thanks), I was able to get the exact returns that I was wanting.


Link Copied to Clipboard