mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2023
Posts: 3
B
bencnu Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
B
Joined: Jan 2023
Posts: 3
I haven't used this code in a while, but I don't seem to get notices when a streamer raids another channel. I used to be able to auto join the channel we were raiding. Did twitch quit sending out notices, or am I forgetting to request something. Thanks for the input!
Code
on *:CONNECT: {

CAP REQ :twitch.tv/membership twitch.tv/tags twitch.tv/commands

;Opens u/raw debug window

debug -p u/Raw

}



;follow raid

on *:NOTICE:*hosting*:*: {

; echo # joined $chr(35) $+ $left($gettok($lower($3),1,32), -1)

join $chr(35) $+ $left($gettok($lower($3),1,32), -1)

}

I also tried doing it with ,
Code

on <level>:PARSELINE:<in|out|*>:matchtext:<commands>

but i am still not seeing the hosting notice in the raw message either. Any ideas would be great. Thanks again!

Joined: Jan 2023
Posts: 3
B
bencnu Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
B
Joined: Jan 2023
Posts: 3
<- u/badge-info=;badges=;color=#FF0000;display-name=TriggerZA;emotes=;flags=;id=4161b527-230e-494c-a7ed-7764394be2f1;login=triggerza;mod=0;msg-id=raid;msg-param-displayName=TriggerZA;msg-param-login=triggerza;msg-param-profileImageURL=https://static-cdn.jtvnw.net/jtv_user_pictures/dbc0fd7f-6744-468d-9195-bf8a9309621a-profile_image-70x70.png;msg-param-viewerCount=5;room-id=53782682;subscriber=0;system-msg=5\sraiders\sfrom\sTriggerZA\shave\sjoined!;tmi-sent-ts=1673299424987;user-id=61829037;user-type= :tmi.twitch.tv USERNOTICE #bumfluffski

I was already in #bumfluffski when #triggerza raided.

I get this message when someone outside is raiding a channel I'm in, but not a notice saying we are raiding another channel so I can automatically join it.

Joined: Dec 2002
Posts: 252
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 252
This looks almost like IRCv3 message-tags data and a new custom IRC event "USERNOTICE" which mIRC does not have an event for, You're right in assuming you'd need to use parseline. Message-tags are escaped key=item pairs separated by a semi-colon ";" The "special" escaping is ";" becomes "\:", " " becomes "\s" "\" becomes "\\" and lastly $cr becomes "\r" and $lf becomes "\n". It's a bit unusual by your raw log there as this extra data is supposed to be "@[key=value pairs seperated by ";"] [raw irc line]" and the @ is missing in your raw debug output.

Assuming this is the correct raw output, tokenizing the parseline by 32, $1 would be the ircv3 data, $2- would be your RAW irc line. An alias like this might help extract some data for you:

Code
alias parsemsgtags {
  if ($regex($1-,/([^=]+=[^; ]*);?/g)) {
    var %matches = $v1 , %x = 0
    while (%x < %matches) { 
      inc %x
      tokenize 61 $regml(%x)
      echo -s $replacex($1,\:,;,\s,$chr(32),\r,$cr,\n,$lf,\\,\) == $replacex($2-,\:,;,\s,$chr(32),\r,$cr,\n,$lf,\\,\)
    }
  }
}

which would break your results down in an echo like this:

tokenize 32 %parseline
parsemsgtags $1

Code
u/badge-info ==
badges ==
color == #FF0000
display-name == TriggerZA
emotes ==
flags ==
id == 4161b527-230e-494c-a7ed-7764394be2f1
login == triggerza
mod == 0
msg-id == raid
msg-param-displayName == TriggerZA
msg-param-login == triggerza
msg-param-profileImageURL == https://static-cdn.jtvnw.net/jtv_user_pictures/dbc0fd7f-6744-468d-9195-bf8a9309621a-profile_image-70x70.png
msg-param-viewerCount == 5
room-id == 53782682
subscriber == 0
system-msg == 5 raiders from TriggerZA have joined!
tmi-sent-ts == 1673299424987
user-id == 61829037
user-type ==

Hopefully by showing how you could parse the ircv3 data, and also parse the irc raw yourself you can come up with what you need. I don't use twitch, so I'm stabbing a guess here that the room you want to join would be the # + msg-param-displayname ? to get #TriggerZA ?

Joined: Jan 2023
Posts: 3
B
bencnu Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
B
Joined: Jan 2023
Posts: 3
Thank you, I will definitely try out that code. It was supposed to be @badge-info= OOOPS , not sure how that changed. The raw output was an example of the information I am getting when I am already in a channel that is getting raided. I don't seem to be getting any information sent to me when the current channel is about to raid another channel so I can automatically join the channel in irc that we are raiding. Maybe they quit sending the notice, I know I used to be able to do it.


Link Copied to Clipboard