Yes, it's been suggested for years. I'd like to propose it again.

On my:*:TEXT: - triggers when you /msg a target
On my:*:NOTICE: - triggers when you /notice a target
On my:*:ACTION: - triggers when you /describe or /me a target
CTCP my:*:foo: - triggers when you /ctcp a target
On my:*:CTCPREPLY: - triggers when you /ctcpreply a target
... etc

The syntax is similar to the undocumented me: prefix, which triggers for server events. The new my: prefix would trigger for client initiated events.

Some might say, "Just use On *:INPUT: to watch for these events." I'm afraid though that On Input doesn't take into consideration when you /msg Khaled unless you were to parse every possible command string and variation. Then you might say, "Just create your own /msg /notice /onotice /me /describe /ctcp /ctcpreply ...etc aliases to capture these events." Again which I would respond that it's extremely tedious and akin to writing your own scripting engine when you have to account for dozens of special conditions, syntax, switches and error handling when re-writing all of these commands.

Example uses for monitoring self-caused events:
  • Unhide a channel or query window that was previously hidden via script when you /msg it.
    On my:*:TEXT:*:*: window -w3 $target
  • Logging specific actions like who you've /invited.
    On my:*:INVITE:#: write invite.log $time $nick $chan
  • Readying a script to handle responses to specific events the user triggers.
    CTCP my:*:PING:?: hadd -m PingTimeVerify $nick $ctime $ticks
  • Here's an example that would be painful for one to parse on their own:
    /MODE #chan +ovob nick1 nick2 nick3 *!foo@bar
    On my:*:OP:#: .timerOpCheck 1 5 /VerifyGotOps $nick $chan)

    (the above event triggers twice for the single /mode command.)
  • Tell the server to accept messages from someone when you're +g (Caller ID message blocking)
    On my:*:OPEN:?: if (g isin $usermode) { .raw ACCEPT $nick }
    (On OPEN works like On Text, for queries, but only triggers on the first message that opens the query/single-message-window)
  • Verify that you intended to /join or /part a channel, and that the server isn't harassing you.
    On my:*:JOIN:#: ... On my:*:PART:#: ...


Please consider that for as long as a decade, people have been requesting this feature. I do believe it would be both feasible to implement and useful to the community.

Pretty please. smile


Well. At least I won lunch.
Good philosophy, see good in bad, I like!