mIRC Home    About    Download    Register    News    Help

Print Thread
#39246 02/08/03 05:05 AM
Joined: Aug 2003
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Aug 2003
Posts: 3
i have this for the other modes
if ($nick isop #) { echo # $clock $nicko $+ 15 $1- | halt }
if ($nick isvo #) { echo # $clock $nickv $+ 15 $1- | halt }

+a gives users a ! instead of an @, and i want to know whats the is--- thing like isop or isvo or isreg
i cant figure it out!



Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
if ($nick isowner $chan) refers to the !. Its undocumented as is the on OWNER event which as you can guess is like on OP or on VOICE but triggers then a user gains ownership.


-KingTomato
Joined: Dec 2002
Posts: 124
B
Vogon poet
Offline
Vogon poet
B
Joined: Dec 2002
Posts: 124
so the on owner event triggers for +a on ultimate ircd and +q on ircx servers.

that's clever.

Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
KingTomato... is there some kind of list of all the undocumented events, identifiers ect floating around? This is the second time i have written a script to work around something, only to find out at a later stage it is built in just undocumented.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
/me still says mIRC should have the non-specific ON LEVEL event.

ON *:LEVEL:#:[the-prefix-here]
ON *:DELEVEL:#:[the-prefix-here]

like,
ON *:LEVEL:#:!:{
.echo -a $nick just got set + $+ $mode (prefix: $pfxmode) on $chan
}

That would echo:
SomeGuy just got set +a (prefix: !) on #TheChannel

I'd also like to see $nick expanded to support "prefix" characters. Meaning, $nick($chan,!) that removes the conflict of mIRC already uses a to mean 'all users'. And also $mode being expanded to support $mode(N,mode). Meaning $mode(1).deop is the same as $mode(1,+o) that way it can work with +a +q or any other levels that servers have.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
To answer your question, the best (and unfortunatly hardest) way to find the things are viewing the versions.txt files that came with each version. Many things added and removed are in there such as the change from $mp3 to $sound ($mp3 is no longer is help file, but is still supported). Things of that nature are listed in the text file that comes with mirc.


-KingTomato
Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
This is what I did to detect the ! prefix.

Code:
 if $nick(#,$nick,!) { do stuff }
 


You can also use the other prefixes as well and use multiple prefixes at the same time i.e.: if $nick(#,$nick,!@+)

Side note: The following is a suitable replacement for the "on op" event if you need to look for the +a mode as well:

Code:
 
on *:rawmode:#: { 
  if ((($1 == +a) || ($1 == +o)) && ($2 == $me)) {  do stuff  }
}
 


That will check to see if you've been opped with ! or @ but $me can be replaced to check if others are opped.


Those who live by the sword get shot by those who don't.
Joined: Aug 2003
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Aug 2003
Posts: 3
thanks the
if $nick(#,$nick,!) { do stuff }
worked, but can i replace $nick with $me? for displaying my input?
i cant seem to get that to work using that code



Joined: Aug 2003
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Aug 2003
Posts: 3
nm! i got it! thanks!

if $nick(# ,$nick , !) && ($nick = $me)
worked if anyone else wanted to know



Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Yea i have been doing that since 5.9 i think, guess ill go through the rest heh.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
That on rawmode is not a suitable replacement at all.

What if I set +oo, since you only test if $1 == +o, it fails. What if I set +lo, again it fails, same for any other combination of modes. It's a lot more complex than that.

Edit:
Code:
ON *:RAWMODE:#:{
  var %takepara = $remove($gettok($chanmodes,1-3,44),$chr(44))
  var %i = 1, %j = 2, %set = $true
  while ($mid($1,%i,1)) {
    var %t = $ifmatch
    if (%t == +) %set = $true
    else if (%t == -) %set = $false
    else if (%t isin $nickmode) {
      var %nick = $eval($chr(36) $+ %j,2)
      if (%set && (%t == o || %t == a)) {
        .echo -a this is like ON OP, except it also works with +a! %nick is the person who was +o/+a'ed
      }
      inc %j
    }
    else if (%t isin %takepara) inc %j
    inc %i
  }
}


That should correctly handle +o and +a in all situations. Replace the .echo -a with the commands you want to execute. %nick contains the nickname that was just set +o or +a, %t contains the mode letter (either o or a) and %set = $true if it is +o/+a, and %set = $false if it is -o/-a.

Last edited by codemastr; 03/08/03 03:56 AM.
Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
Point taken. My suggestion was too narrowly focused on my specific use for it which is being opped by chanserv when I join a channel, although I had not considered multiple mode setting either.


Those who live by the sword get shot by those who don't.
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Hmm I guess some networks are different, on the networks I go to ChanServ will usually send multiple mode changes in a single mode command.

Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Yea i had to use rawmode though, because the owner event/identifier would not work on the network i am on.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard