|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Someone that know how to make mirc see the modes on a user? if $nick isop $chan see if a users have op.. but how about the other modes? like & , % and ~ ? im on Unreal ircd..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Dec 2002
Posts: 2,031
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,031 |
% = ishop
I don't think there is an operator for the other two on Unreal.
Last edited by RoCk; 01/05/07 12:16 PM.
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
You can check halfops via ($nick ishop $chan). Regarding protected/admin and owner, there is no operator like isreg/isvoice/ishop/isop. Eighter make a script grabbing and parsing all rawmodes, or use $nick(#,N/nick,aohvr,aohvr).pnick property to check for owner-/admin-status. At least on unreal, get all supported nick prefixes via "/version"; the reply contains a string to associate mode chars with pnick properties, eg. "PREFIX=(qaohv)~&@%+" means: mode: +q = char: ~ (= status: owner) mode: +a = char: & (= status: admin) etc $nickmode will return "qaohv", (I dont remember a proper identifier returning the later "~&@%+", maybe there is none)
|
|
|
|
Joined: Dec 2002
Posts: 2,031
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,031 |
I dont remember a proper identifier returning the later "~&@%+", maybe there is none $prefix
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
$prefix will return ~&@%+ , but how do i identify if the nick have the & or the ~ prefix ? since it returns ~&@%+ for everyone i dont understand how to filter out whats infront of the nick, and a whois is a slow thingie, so it wold take for ever to check a whole channel befor a command is executed..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
someone gets ~ when chanserv gives them +q, so:
if ($nick($chan,$nick,q)) echo -a *** they are mode ~ if ($nick($chan,$nick,~)) echo -a *** they are mode ~
It seems to let you use q and ~ interchangeably.
+a gives them mode &
Note that isop seems to cover people having mode @ or & or ~, so if you want only the @ level, $nick($chan,$nick,o,aq)
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
$nick() accepts both mode letters and symbols, so you can do something like this: if ($nick(#,$nick,&)) echo -a $nick has mode & on channel # maroon beat me to it
Last edited by qwerty; 01/05/07 12:36 PM.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 2,031
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,031 |
Note that isop seems to cover people having mode @ or & or ~ I think this is because @ is set at the same time on join as the others. I've always seen ChanServ do this for as long as I can recall. [07:47] * Now talking in #Chan [07:47] * ChanServ sets mode: +ao RoCk RoCk
[07:48] * Now talking in #Chan [07:48] * ChanServ sets mode: +qo RoCk RoCk
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
I think this is because @ is set at the same time on join as the others. I've always seen ChanServ do this for as long as I can recall. Not entirely though. * maroon has joined #maroon * ChanServ sets mode: +q maroon//if (maroon isop #maroon) echo -a *** maroon isop *** maroon isop It may also be depending on the mIRC version, as I do recall times in the past where isop didn't recognize them as op when you join after they reached that level, because .pnick was only displaying their highest level.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
$nick() accepts both mode letters and symbols, so you can do something like this: if ($nick(#,$nick,&)) echo -a $nick has mode & on channel # maroon beat me to it This show everyone as & in the channel, even deoped people so it's not op that mess with it.. and by the way, had to replace $nick with $1 to make it show anything..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Additional note, using $remove($nick(#,$nick).pnick,$nick) will return all of $nick's active modes.
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
You must be doing something wrong, as it has always worked fine for me. As usual, you should experiment with it to make sure you understand how it works, eg try typing //echo -a $nick(<channel>,<nick>,<symbol>) with various values for <channel>, <nick> and <symbol>, to see what it returns.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
[snip] and by the way, had to replace $nick with $1 to make it show anything.. You started off the thread referring to "$nick isop $chan", so we assumed you were using this inside an $event that recognizes $nick. If you had to use $1 instead of $nick, it sounds like you are actually using this as part of the nicklist's right-click menu, or perhaps from a timer where the nick is fed as a commandline parameter.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
i trying to edit one of my scripts, and thats why i refered to $nick isop, but i testing it as you staded true the menu nicklist, if i can get it to work there, then i can solve the problem when i use it in a alias file..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Mar 2006
Posts: 395
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Mar 2006
Posts: 395 |
Mirc supports isowner... But it seems that it is not checked properly... Basically it checks for the . in the nickname rather than the mode "q". (The . is in the specifications for IRCX) Anyway... Hopefully this will help you out - its a custom alias (or 2) I made which (SHOULD) work on every network.
alias -l oz.chmode return $iif($regex($nickmode,/( $+ $$1 $+ )/),$mid($prefix,$regml(1).pos,1),$iif($regex($prefix,/( $+ $$1 $+ )/),$mid($nickmode,$regml(1).pos,1),$false))
alias ischmode return $iif($oz.chmode($$3) == $left($nick($2,$1).pnick,- $+ $len($1)),$true,$false)
$ischmode( <Nick>, <#Chan>, <mode>) will return $true is NICK is that MODE on the CHANNEL.
[02:16] * Titanic has quit IRC (Excess Flood)
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
It isn't that it's not checked properly. It's checked that way on purpose to support that one network per the versions.txt file.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|