mIRC Home    About    Download    Register    News    Help

Topic Options
#175977 - 01/05/07 12:42 PM & , % and ~ mode
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
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,.) }

Top
#175979 - 01/05/07 01:13 PM Re: & , % and ~ mode [Re: sparta]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2010
% = ishop

I don't think there is an operator for the other two on Unreal.


Edited by RoCk (01/05/07 01:16 PM)

Top
#175980 - 01/05/07 01:14 PM Re: & , % and ~ mode [Re: sparta]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
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)

Top
#175981 - 01/05/07 01:18 PM Re: & , % and ~ mode [Re: Horstl]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2010
Quote:
I dont remember a proper identifier returning the later "~&@%+", maybe there is none


$prefix

Top
#175982 - 01/05/07 01:24 PM Re: & , % and ~ mode [Re: RoCk]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
$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
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#175984 - 01/05/07 01:35 PM Re: & , % and ~ mode [Re: sparta]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1158
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)

Top
#175985 - 01/05/07 01:35 PM Re: & , % and ~ mode [Re: sparta]
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
$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


Edited by qwerty (01/05/07 01:36 PM)
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top
#175987 - 01/05/07 01:49 PM Re: & , % and ~ mode [Re: maroon]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2010
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

Top
#175989 - 01/05/07 02:04 PM Re: & , % and ~ mode [Re: RoCk]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1158
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.

Top
#175990 - 01/05/07 02:50 PM Re: & , % and ~ mode [Re: qwerty]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
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..
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#175995 - 01/05/07 04:15 PM Re: & , % and ~ mode [Re: sparta]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Additional note, using $remove($nick(#,$nick).pnick,$nick) will return all of $nick's active modes.

Top
#176002 - 01/05/07 05:39 PM Re: & , % and ~ mode [Re: sparta]
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
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

Top
#176052 - 02/05/07 03:50 AM Re: & , % and ~ mode [Re: sparta]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1158
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.

Top
#176062 - 02/05/07 09:57 AM Re: & , % and ~ mode [Re: maroon]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
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,.) }

Top
#176209 - 06/05/07 05:28 AM Re: & , % and ~ mode [Re: sparta]
The_JD Offline
Fjord artisan

Registered: 28/03/06
Posts: 393
Loc: New South Wales, Australia
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.
_________________________
[02:16] * Titanic has quit IRC (Excess Flood)

Top
#176231 - 06/05/07 06:22 PM Re: & , % and ~ mode [Re: The_JD]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
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

Top