mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
staff users on the server have prefixes '^ next to their names

but higher owners have a ' prefix

is there a way i can get the total users for each one without using a loop?

$nick($chan,0,') is no good as this would work for both staff and higher owners. this is for a nicklist dialog im working on.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Use regular expressions:
Code:
if ($regex($nick,/(\136)/Si))


Above code will match the staff prefix ^ only.


Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you are talking about a single command that will give you all the users in a channel/server with ^ at the beginning of their nickname, a loop is likely the only (reliable) way to get that result. The actual way you perform the loop and comparisons is up to you, but the simplest comparison would be something like this:

if (^* iswm $nick) ;command

or

if ($left($nick,1) == ^) ;command

-genius_at_work

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Is ^ a mode prefix (so that "staff users" have two modes, ' and ^)? If so, you can simply use $nick()'s 4th parameter to exclude the ^ mode (/help $nick).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I have a feeling that pouncer's residing network is Buzzen. I have seen their chat netowrk with staff usermode prefixed with ^' in front. I actually tried if $nick(#,$nick,^) or based on your saying, $nick(#,0,',^)...and with .pnick alike; But they didn't work for some reason. The only one works is the regex one I posted above.

Last edited by Tomao; 25/01/09 04:28 AM.

Link Copied to Clipboard