mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
I'm using this to set certain events

it restrict it to ops only need it to work for hop up to founder any suggestions

Quote:

on *:text:* is *:#:{
if ($nick isop #) { /writeini -n system\replies\nicktalk.ini $1 nick $1 | /writeini -n system\replies\nicktalk.ini $1 char $2- | .msg $chan  3 $+ $1 $2- | halt }

else return
}

Last edited by raycomp; 11/07/17 04:37 PM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
The symbol for founder and protected-op aren't 100% standard for all networks, but most common are tilde (~) and ampersand (&) respectively. The 2nd line for /help $nick shows:

$nick(#,N/nick,aohvr,aohvr)

but it also allows you to use channel nickmodes or prefixes, as long as that nickmode isn't already on the list. So, for founder you can use either the tilde or the +q mode that gives them that status. You can't use the mode +a given to protected-ops because 'a' has already been defined as 'all nicks'.

Code:
on *:text:* is *:#:{ 
 if ($nick(#,$nick,~&@%)) { /writeini -n system\replies\nicktalk.ini $1 nick $1 | /writeini -n system\replies\nicktalk.ini $1 char $2- | .msg $chan  3 $+ $1 $2- | halt }
 else return
}



'o' and '@' are interchangeable above, as are 'h' and '%', and are 'v' and '+'. If you need to treat each status level different than the others, you would need to use something like:

$nick( # , $nick , channel level , all superior levels )

For example, since Founder and ProtectedOps are also given +o, if you want to address ONLY the nicks displaying the @ prefix, You should either handle lower levels as the 'else' part of an if/else section that previously addressed the superior levels, or use the 4th parameter listing the superior levels ~&.

In the channel list, nicks can be given multiple status levels, but they will display the prefix of only the highest level. That's why $nick($chan,0,v) is not always the same as the number of nicks displaying the + status because it's possible for a nick displaying @ status to also have +v status.

Code:
//window -a $chan(1) | echo -a There are $nick(#,0) nicks in # $iif($nick(#,0,~),- There are $v1 Founder level) $iif($nick(#,0,&,~),- There are $v1 ProtectedOp level) $iif($nick(#,0,@,&~),- There are $v1 NormalOp level) $iif($nick(#,0,h,o&~),- There are $v1 Half-Op level) $iif($nick(#,0,+,ho&~),- There are $v1 Voice level) $iif($nick(#,0,r),- There are $v1 Regular nicks)







Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
that is not the answer to my problem

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Then restate your problem clearly. Are you needing to have different action for each level? Because all I did to alter your code was change your

if ($nick isop #)
into
if ($nick(#,$nick,~&@%))

and this code will do what you stated, it takes action for hop thru founder, which is how I read your question.


Link Copied to Clipboard