mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2016
Posts: 2
F
Bowl of petunias
OP Offline
Bowl of petunias
F
Joined: Jun 2016
Posts: 2
I switched from mIRC 7.38 to 7.45 a few days ago and noticed today that incoming whispers don't trigger the RAW event anymore.

I used to be able to handle whispers like this to show them in a query window
Code:
alias wr return /([^ ]*) :([a-zA-Z0-9_]+)\![a-zA-Z0-9_]+@[a-zA-Z0-9_]+\.tmi\.twitch\.tv WHISPER ([a-zA-Z0-9_]+) :(.*)/Sig

raw *:*: { 
  if ($regex($rawmsg,$wr) > 0) {
    var %nick = $regml(2)
    var %msg = $regml(4)
    var %colornick = $cnick(%nick).color

    ; open query if there is none yet
    if ($window(%nick) == $null) {
      query -n %nick
    }

    ; Show message in query
    echo -itmlbg %nick $+(<,%colornick,%nick,>) %msg
    haltdef  
  }
}


Currently, I switched to the PARSELINE event but I don't feel like that's the way to go. Am I missing here something or is there just an error in my script?

The whisper syntax looks like this
Code:
[tags] :[sender]![sender]@[sender].tmi.twitch.tv WHISPER [recipient] :[message]

Example:
Code:
@badges=;color=#8A2BE2;display-name=FreddyBot;emotes=;message-id=77;thread-id=37468248_47772503;turbo=0;user-id=47772503;user-type= :freddybot!freddybot@freddybot.tmi.twitch.tv WHISPER freddyoriginal :test message

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Since i've moved to the new code, i forget exactly what i used to do. With the latest version of mirc, i've switched to using normalizers from sreject.

https://github.com/SReject/mTwitch

Much easier to handle whispers.


twitter @keyeslol
Joined: Jun 2016
Posts: 2
F
Bowl of petunias
OP Offline
Bowl of petunias
F
Joined: Jun 2016
Posts: 2
Oh wow, that's an extensive script.
I looked through the code and noticed that SReject is also working with the parseline event. So I assume that really is the way to go. His code is so much better tho :P

Thanks for the answer

Last edited by FreddyOriginal; 07/06/16 05:32 PM.
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Well, thank you then smile


I am SReject
My Stuff

Link Copied to Clipboard