mIRC Home    About    Download    Register    News    Help

Print Thread
on PARSELINE question [Twitch] #265212 18/03/19 09:16 PM
Joined: Sep 2015
Posts: 26
Z
zigress Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Sep 2015
Posts: 26
I am using SRReject's code for grabbing Twitch whispers.
Code:
;;Transforms inbound twitch whispers into private message queries
on $*:PARSELINE:in:/^((?:@\S+ )?)(\x3A[^!@ ]+![^@ ]+@\S+) WHISPER (\S+) (\x3A.*)/i:{
  var %Tags   = $regml(1)
  var %User   = $regml(2)
  var %Target = $regml(3)
  var %Msg    = $regml(4)
  }
}

I have been successful in reading the code in the status window. I am not successful in responding to the code. Below is my code which I am using to see if my bot will respond to a Twitch whisper:
Code:
ON *:TEXT:!test2:*: {
  echo -s debug: line number $scriptline $chr(124) from = $nick $chr(124) in = $chan
}

There is an output when !test2 is typed in a Twitch channel. There is no output when the same is typed in a Twitch whisper.

I would appreciate any help on how I can be able to respond to Twitch whispers. I feel as if I am missing something obvious but I can't seem to figure it out. Thank you in advance.

Re: on PARSELINE question [Twitch] [Re: zigress] #265213 18/03/19 11:07 PM
Joined: Feb 2003
Posts: 2,660
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,660
Your code in the top section is incomplete. It requires a /parseline command at the bottom to reinterpret the WHISPER into PRIVMSG. Perhaps you should review your notes from SReject.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: on PARSELINE question [Twitch] [Re: Raccoon] #265214 19/03/19 03:12 AM
Joined: Sep 2015
Posts: 26
Z
zigress Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Sep 2015
Posts: 26
Right, I did forget to put that. More importantly, I forgot to put the parseline out section in the code. It's working now! Thank you!