mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 67
N
Naz Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
The network I frequent recently changed ird. It now supports mode +a and prefixes the nick with a ! symbol. This has effectively broken my script.

How can I make my script respond to events only when I am +a ? Now I also have to op myself also in order for the script to work. Looking for the equivalent of:

on @*:join:*:#: {.......}

someway to limit action to channels I am opped in or mode +a'd in.


Those who live by the sword get shot by those who don't.
Joined: Feb 2003
Posts: 67
N
Naz Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
nevermind, I answered my own question through experimentation.

on !@:text:*:#: {......}

triggers the event either when I am opped, mode +a or both. My thinking was that the !@ would only cause it to trigger when I was not opped but that doesn't appear to be the case.


Those who live by the sword get shot by those who don't.
Joined: May 2003
Posts: 7
J
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
J
Joined: May 2003
Posts: 7
The ! prefix in events means that the event is not triggered when you trigger the event urself...
so the ! has nothing do to with the +a mode...

Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
if ( $chr(33) isin $nick($chan,$me).pnick ) { . . . }


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The ! prefix is reserved (a special symbol that makes the event trigger for everybody except you), so I don't think you'll be able to use it for that purpose. So, you need an /if statement that checks if you are !'ed:
Code:
on !*:join:#: if $nick(#,$me,[color:green]![/color]) { do your stuff }
Yes, you can use mode symbols too with $nick()


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Feb 2003
Posts: 67
N
Naz Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
Thanks folks, all good points. Minor brain fart with my interpretation of the !. For some reason my previous attempt worked in that one instance but it is obvious now I didn't do it the right way.


Those who live by the sword get shot by those who don't.

Link Copied to Clipboard