mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Originally Posted By: /help /haltdef

The ^ event prefix currently works only on the following types of events: <list of events that doesn't include ON NOTIFY or ON UNOTIFY>


Not only does the ^ prefix work in both events, but the effect of /haltdef in NOTIFY carries over to UNOTIFY. To demonstrate, this was the only script loaded:

Code:
on ^*:NOTIFY:{ if ($nick == maroon) haltdef | echo -s NOTIFY $nick $halted }
on ^*:UNOTIFY:{ echo -s UNOTIFY $nick $halted }


For all other nicks, these events both get triggered, and display '$nick $false'. But for the nick 'maroon' these events trigger with messages

NOTIFY maroon $true
UNOTIFY maroon $true

... where the $halted value for the maroon nick carries over from the NOTIFY event to UNOTIFY in spite of UNOTIFY not containing the /haltdef command.

If there is no ^ on the UNOTIFY event that didn't contain "haltdef", the "maroon has left" message displays normally, as does the offline-sound configured in addressbook/notify.

If this is desired behavior, it would be helpful to mention that behavior on the /notify and/or /halted pages. If it's supposed to be that way, are there other pairs that should also behave the same? i.e. /haltdef for maroon in ON JOIN using the ^ prefix doesn't cause the ^ in ON PART to also automatic-trigger /haltdef suppression of the part-message too.

Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Update.

In addition to this behavior, the $halted state is remembered by future ON NOTIFY events too. Once /haltdef has been applied to a nick, even within the ON NOTIFY not using the ^ prefix, $halted continues to be $true for that nick, even when the event handler no longer re-applies the /haltdef as they re-join. The $halted being $true only suppresses the display if the ^ prefix is then added or encountered later. Once a nick has ($halted == $true) applied to them, you must use "/notify" to stop it from inheriting the $true.

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Quote:
Not only does the ^ prefix work in both events

Thanks, this description is actually very old and covered items that were supported at the time. As the events covered by this feature change all the time, the description has been changed to state that it is supported by some events and that you would need to test it with an event to see if it works with it.

Quote:
For all other nicks, these events both get triggered

This issue has been fixed for the next version.


Link Copied to Clipboard