mIRC Homepage
Posted By: sparta & , % and ~ mode - 01/05/07 11:42 AM
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..
Posted By: RoCk Re: & , % and ~ mode - 01/05/07 12:13 PM
% = ishop

I don't think there is an operator for the other two on Unreal.
Posted By: Horstl Re: & , % and ~ mode - 01/05/07 12:14 PM
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)
Posted By: RoCk Re: & , % and ~ mode - 01/05/07 12:18 PM
Quote:
I dont remember a proper identifier returning the later "~&@%+", maybe there is none


$prefix
Posted By: sparta Re: & , % and ~ mode - 01/05/07 12:24 PM
$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.. crazy
Posted By: maroon Re: & , % and ~ mode - 01/05/07 12:35 PM
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)
Posted By: qwerty Re: & , % and ~ mode - 01/05/07 12:35 PM
$nick() accepts both mode letters and symbols, so you can do something like this:
Code:
if ($nick(#,$nick,&)) echo -a $nick has mode & on channel #


maroon beat me to it
Posted By: RoCk Re: & , % and ~ mode - 01/05/07 12:49 PM
Quote:
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
Posted By: maroon Re: & , % and ~ mode - 01/05/07 01:04 PM
Originally Posted By: RoCk
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.
Posted By: sparta Re: & , % and ~ mode - 01/05/07 01:50 PM
Originally Posted By: qwerty
$nick() accepts both mode letters and symbols, so you can do something like this:
Code:
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.. smirk and by the way, had to replace $nick with $1 to make it show anything..
Posted By: RusselB Re: & , % and ~ mode - 01/05/07 03:15 PM
Additional note, using $remove($nick(#,$nick).pnick,$nick) will return all of $nick's active modes.
Posted By: qwerty Re: & , % and ~ mode - 01/05/07 04:39 PM
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.
Posted By: maroon Re: & , % and ~ mode - 02/05/07 02:50 AM
Originally Posted By: sparta
[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.
Posted By: sparta Re: & , % and ~ mode - 02/05/07 08:57 AM
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..
Posted By: The_JD Re: & , % and ~ mode - 06/05/07 04:28 AM
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.


Code:
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.
Posted By: Riamus2 Re: & , % and ~ mode - 06/05/07 05:22 PM
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.
© mIRC Discussion Forums