Since I can't edit my original post, I'm posting this to possibly better explain what's lacking in mIRC and the feature itself.

What's Lacking

As stated previously with the rise of CAP mIRC does not have a graceful way for scripts to handle messages that deviate from the IRC protocol. This can be a very large limiting factor for mIRC connecting to servers that are branching out to become multi-purpose. Not only do these modules add custom event messages if the client enables the capability but they may also alter otherwise parsable event messages in such ways that mIRC is unable to understand them.

This is not a twitch-specific feature request. I am on 3 different networks that have custom capabilities that alter, otherwise parsable, user messages when enabled. For the tech-inept it boils down to them hoping the home-brewed obscure cap module their server uses gets native support or do without. For those with enough know-how spend hours writing a local-proxy to trim off an invalidating prefix.

If it was just about displaying a custom event message, it could be left to using the RAW event but these capabilities alter JOIN, PART, PRIVMSG, NOTICE etc events for which mirc and scripts depend on. There's not, currently, a way for mIRC/mSL to handle these types of messages in such a way to allow for mIRC to maintain a connection's state. For example, a script is able to handle echoing a 'join' message to the correct channel from the RAW event, but there's no way to add said user to the nicklist, update the IAL, or alter $nick().idle.


The suggestion
I suggest a the addition of a /parse command that can only be used from within the RAW event. This command would pass a string to mIRC's internal server-message event handling as though the string was just received from the IRC server. Using /halt from within a RAW event that makes use of /parse would not only stop the display but stop further handling of the original message:
Code:
/parse <text>
    <text>: Text to be handled as server-message event



Example
Code:
; assuming $rawmsg is "@stuff :Nick!ident@host PIRVMSG #chan :msg"
raw *:*:{
  if ($regex($rawmsg, /^@(\S+) (:.+)$/)) {

    /* do stuff with $regml(1) */

    ; have mIRC handle the rest of the message
    parse $regml(2)
    halt
  }
}


Last edited by FroggieDaFrog; 24/05/15 11:04 PM.

I am SReject
My Stuff