mIRC Home    About    Download    Register    News    Help

Print Thread
$vnick(#,o) - $onick(#,0) #167633 28/12/06 02:49 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167634 28/12/06 02:55 AM
Joined: Dec 2006
Posts: 16
S
SithLORD Offline
Pikka bird
Offline
Pikka bird
S
Joined: Dec 2006
Posts: 16
try this , my friend

//echo -a $nick(#,0,r)

Re: $vnick(#,o) - $onick(#,0) [Re: SithLORD] #167635 28/12/06 03:07 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I figured that out smile 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? smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167636 28/12/06 03:36 AM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
A regular user is one who isn't OP, voice, halfop/helper, admin, <whatever else here>. Think of it as a non-status.


* cold edits his posts 24/7
Re: $vnick(#,o) - $onick(#,0) [Re: cold] #167637 28/12/06 03:59 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
same as $nick(#,0) then ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167638 28/12/06 04:05 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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.


Invision Support
#Invision on irc.irchighway.net
Re: $vnick(#,o) - $onick(#,0) [Re: Riamus2] #167642 28/12/06 04:59 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
im a bit tired, it should be $nvnick(#,0) . not $nick(#,0) .. and that give the same result as $nick($chan,0,r) . or ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167643 28/12/06 05:08 AM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
$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().

Last edited by cold; 28/12/06 05:20 AM.

* cold edits his posts 24/7
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167644 28/12/06 05:12 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: $vnick(#,o) - $onick(#,0) [Re: RusselB] #167666 28/12/06 05:05 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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.


Invision Support
#Invision on irc.irchighway.net
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167672 28/12/06 05:56 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
One suggestion that I just thought about...

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.


Invision Support
#Invision on irc.irchighway.net
Re: $vnick(#,o) - $onick(#,0) [Re: sparta] #167739 29/12/06 08:59 AM
Joined: Feb 2006
Posts: 164
V
vexed Offline
Vogon poet
Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
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,*)

I've seen all those, dunno if there's more grin

Last edited by vexed; 29/12/06 09:00 AM.