How can i grab regulares in this way? and what make a person a regulare on a channel? dont know if this mode exist on all networks, i know it exist on quakenet tho..
I figured that out but what says if a user is regulare or not? i have been idling in some channels for ages, still im not a regulare on the channel, so what does say a user is a regulare or not?
No. $nick($chan,0) gives you all nicks on the channel regardless of status. Regulars are the ones who aren't opped/voiced/etc (as mentioned).
$nick($chan,0,r) gives you the number of regular users. $nick($chan,0,v) gives you the number of voiced users. $nick($chan,0,o) gives you the number of opped users.
Note that you can use # instead of $chan, but I never like using that. I think $chan is more appropriate, but that's just my opinion.
$nick($chan,0,r) is usually the same as $nick($chan,0,a,ovh), which means: "all users, except ops, voices and halfops/helpers). Of course there is the admin in some networks, just like I said before, but I'm just going by the default parameters in the help file. Due to this possible discrepancy, you should use $nick($chan,0,r).
$nvnick() looks for non-voiced people, which isn't the same thing (someone who isn't voiced could be an op, or a halfop/helper, or an admin, etc). Edit: oops, I guess I was wrong about $nvnick()... I assumed it was about non-voiced users. You see, deprecated identifiers ($nvnick(), $onick(), etc.) do that to some people. One more issue related to what RusselB just said below. I think you should use $nick().
As $nvnick($chan,0) isn't in the official help file, I won't recommend using it, although it does return the same result as $nick($chan,0,r) Some helpers seeing $nvnick and not finding it in the help file will presume that it references a custom alias.
The recommended format is $nick($chan,0,r) to obtain a count of the regular (non-voiced, non-half-opped, non-opped, etc.) people in the specified channel.
Also, using something that is deprecated like that could cause your scripts to suddenly stop working when a new version of mIRC is released that no longer supports using those.
If you're checking voiced users (or voiced and regular users), you should use one of these (depending if you want just voiced or voiced & regular:
$nick($chan,0,v,o) $nick($chan,0,rv,o)
The reason is that if you don't tell it to ignore opped users, you'll also count all ops who are also voiced. $vnick also counts ops that are voiced.
You can try it out. Voice a couple of ops so that they are +ov and then check the number of voiced users in the channel. It won't match the number who are just voiced.
Just to note: You can add the mode prefixes that the network supplies also, IE:
//echo -a $nick($chan,0,@) //echo -a $nick($chan,0,+) //echo -a $nick($chan,0,.) //echo -a $nick($chan,0,%) //echo -a $nick($chan,0,~) //echo -a $nick($chan,0,^) //echo -a $nick($chan,0,!) //echo -a $nick($chan,0,&) //echo -a $nick($chan,0,-) //echo -a $nick($chan,0,*)