mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 11
M
mite Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Mar 2004
Posts: 11
greetings, i need to get a list of what modes a person has on my channel, as admins have +oa and ops have +o, is this possible through mirc script?

i need to be able to see the specific letter modes each person has on a specific channel because +oa and +o users both have the same mode prefix, so things like $nick($chan,%i).pnick and /names #channel will not suffice.

if this isnt possible, i really think mirc should support it (perhaps a $nick($chan,%i).modes ?) and ill post in the suggestions forum, however, if anyone has any sort of idea how i can do this even with a dll or outside script, please let me know.

thanks! smile

Joined: Jan 2004
Posts: 26
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 26
Hi,

first check out two nice Identifiers:

$prefix ... returns supported Nick Prefixes
$nickmode ... returns supported Nick Modes on channels (this Identifier is undocumented)

both are catched on RAW 005 (during connect)

lets say $prefix == !*@%=+
and $nickmode == qaohVv

then ! = q, * = a, @ = o, and so on.

now use $nick(<#channel>,<nickname>).pnick and isin to extract each of the channels modes

Joined: Jan 2004
Posts: 26
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 26
Ok, heres the code:

Code:
alias nickmodes {
 var %m, %n = $len($prefix)
 while (%n) {
  if ($mid($prefix,%n,1) isin $nick($1,$2).pnick) %m = $+($mid($nickmode,%n,1),%m)
  dec %n
 }
 return %m
}


$nickmodes(<#channel>,<nickname>) returns ur modes...

Joined: Mar 2004
Posts: 11
M
mite Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Mar 2004
Posts: 11
like i explained, this doesnt work because, +oa and +o both have the same prefix character. (@) but thanks for trying.

Joined: Jan 2004
Posts: 26
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 26
Oh! my fault.... crazy

so you need to catch up the RAWMODE Event (/help on RAWMODE) and store it (hash table, $ial().mark or whatever).

Joined: Mar 2004
Posts: 11
M
mite Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Mar 2004
Posts: 11
i find it silly that you cant return this info. i mean, its there. its possible to get it. mirc just doesnt support it.

Joined: Sep 2003
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Sep 2003
Posts: 58
If i'm right you could see this info in the /whois.
So just strip out the whois...

RAW 313:*: { }
Or something like that...

313 is for Admins IRCops and so on...
These are the things this RAW could return :
:is an IRC administrator
:is an IRC global operator
:is an IRC system manager
:is an IRC operator
:is an IRC system operator
(((unless the owner of the server changed these messages)))

Try something with this...
I used this one to let my bot send the admins all kill / kline logs.

Good Luck trying...

stimpy


***************************
To chat, or not to chat.
That's the question
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
He means channel modes, not user modes.

Joined: Sep 2003
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Sep 2003
Posts: 58
what does the +a channelmode do ?
i don't know this one...


***************************
To chat, or not to chat.
That's the question
Joined: Mar 2004
Posts: 11
M
mite Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Mar 2004
Posts: 11
makes them an admin. so that regular ops cant kick them. (unreal IRCd)

Joined: Sep 2003
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Sep 2003
Posts: 58
Aha...
I only know IRCx so that's why i didn't know it..

Thanks


***************************
To chat, or not to chat.
That's the question

Link Copied to Clipboard