mIRC Home    About    Download    Register    News    Help

Print Thread
#91594 23/07/04 09:23 PM
Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
This is not coming as easy as I thought it would, so I'm asking for a little help here. For some scripts, I need to kick users only, other scripts( users & +v), and other scripts ( users and +v and %) . I am having a hard time being able to single out each individual one from the other, as many terms such as isreg and isop, really lump all three (+v, %, @ ) together. Am I going to have to use a comchannel thing here, or does anyone know of a sure-fire method to single out each indivual level....maybe that's it?..Use a level instead?

Any suggestions? These will all mostly be embedded 'on text' if that matters. Thanks.

Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
well, one way you could do it would be to use mirc's internal lists for voice and ops and then use something along the lines of:

if ($nick/$address isaop #channel) { stuff1 }
if ($nick/$address isavoice #channel) { stuff2 }
if ($nick ishop #chan) { stuff3 }


Of course you can use (and I find it works fairly easy for me):

if ($nick isop #channel) { stuff1 }
if ($nick isvoice #channel) { stuff2 }
if ($nick ishop #channel) { stuff3 }

You could also do combinations like:

if (($nick isreg #chan) || ($nick isvoice #chan)) { stuff1 }
if (($nick ishop #chan) || ($nick isvoice #chan)) { stuff2 }

You dont need to use comchan (unless you want the effect to happen over many channels (or jstu more than one)). I would suggest you read up on isreg, isop, isvoice, user levels, /aop & /avoice to get familair with them.

If I misunderstood what you wanted, forgive me


Those who fail history are doomed to repeat it
Joined: Jan 2004
Posts: 46
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
I appreciate the fast response, but yes, I may not have made myself too clear. I have noticed that isop, ishelp, isvoice, ALL stop all three, even though they are used individually. In other words, if I say: if ($nick isop #) return, it returns for ALL three, including % and +v....this was my point. I need to get particualr here, and those commands aren't working. Thanks anyways.

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I didn't really understand you, but you might want to check out $nick(). For example:

$nick(#blah,qwerty,o) returns a number > 0 if qwerty is an op in #blah, otherwise $null

$nick(#blah,qwerty,o,v) returns a number > 0 if qwerty is an op in #blah but NOT voiced at the same time, otherwise $null. So, if I'm opped and voiced at the same time OR a regular, it returns $null.

$nick(#blah,qwerty,o,vh) returns a number > 0 if qwerty is an op but not voiced or halfop at the same time, otherwise $null.

You can also use a number (index) instead of a specific nickname in all examples above. In this case, if there's a match, the nickname is returned.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
weird, isvoice and isop never react at the same time for me. Are you using a custom script of any kind? When I use isop, isvoice, and isreg they fire at op, voice, regular user respectively and havfe never fired otherwise for me hence my question about your script


Those who fail history are doomed to repeat it
Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
You can also use the mode prefix to determine the status of the user:

if $nick(#,$nick,@) { do stuff }
elseif $nick(#,$nick,%) { do this_stuff }
elseif $nick(#,$nick,+) { do other_stuff }
etc etc

That will distinguish between @, %, + mode prefixes for users. You can also use it on yourself.... $nick(#,$me,@)


Those who live by the sword get shot by those who don't.
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I didn't know you could use the chars in that! ty smile


"All we are saying is give peace a chance" -- John Lennon

Link Copied to Clipboard