mIRC Home    About    Download    Register    News    Help

Print Thread
& , % and ~ mode #175977 01/05/07 11:42 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: & , % and ~ mode [Re: sparta] #175979 01/05/07 12:13 PM
Joined: Dec 2002
Posts: 2,010
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,010
% = 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.
Re: & , % and ~ mode [Re: sparta] #175980 01/05/07 12:14 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
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)

Re: & , % and ~ mode [Re: Horstl] #175981 01/05/07 12:18 PM
Joined: Dec 2002
Posts: 2,010
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,010
Quote:
I dont remember a proper identifier returning the later "~&@%+", maybe there is none


$prefix

Re: & , % and ~ mode [Re: RoCk] #175982 01/05/07 12:24 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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.. crazy


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: & , % and ~ mode [Re: sparta] #175984 01/05/07 12:35 PM
Joined: Jan 2004
Posts: 1,178
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,178
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)

Re: & , % and ~ mode [Re: sparta] #175985 01/05/07 12:35 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$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

Last edited by qwerty; 01/05/07 12:36 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: & , % and ~ mode [Re: maroon] #175987 01/05/07 12:49 PM
Joined: Dec 2002
Posts: 2,010
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,010
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

Re: & , % and ~ mode [Re: RoCk] #175989 01/05/07 01:04 PM
Joined: Jan 2004
Posts: 1,178
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,178
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.

Re: & , % and ~ mode [Re: qwerty] #175990 01/05/07 01:50 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
Re: & , % and ~ mode [Re: sparta] #175995 01/05/07 03:15 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Additional note, using $remove($nick(#,$nick).pnick,$nick) will return all of $nick's active modes.

Re: & , % and ~ mode [Re: sparta] #176002 01/05/07 04:39 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
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
Re: & , % and ~ mode [Re: sparta] #176052 02/05/07 02:50 AM
Joined: Jan 2004
Posts: 1,178
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,178
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.

Re: & , % and ~ mode [Re: maroon] #176062 02/05/07 08:57 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: & , % and ~ mode [Re: sparta] #176209 06/05/07 04:28 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
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)
Re: & , % and ~ mode [Re: The_JD] #176231 06/05/07 05:22 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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