mIRC Homepage
Posted By: Naz mode +a with the ! nick prefix - 02/05/03 11:07 PM
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.
Posted By: Naz Re: mode +a with the ! nick prefix - 02/05/03 11:18 PM
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.
Posted By: j0ch3n Re: mode +a with the ! nick prefix - 02/05/03 11:58 PM
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...
Posted By: theRat Re: mode +a with the ! nick prefix - 03/05/03 10:57 AM
if ( $chr(33) isin $nick($chan,$me).pnick ) { . . . }
Posted By: qwerty Re: mode +a with the ! nick prefix - 03/05/03 11:28 AM
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()
Posted By: Naz Re: mode +a with the ! nick prefix - 04/05/03 03:07 AM
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.
© mIRC Discussion Forums