SReject / mTwitch

Twitch normalizer for mIRC
21 stars 8 forks source link

Resub messages don't show #23

Open Montygue opened 5 years ago

Montygue commented 5 years ago

Trying to figure out why sub and resub messages dont show at all. It shows who subs and how long but doesnt seem to show what they say. I can see it in the user notices in the status window but it wont add it in the channel I couldnt get it to work myself by editing the mtwitch.core.mrc

sx66627 commented 3 years ago
if ($msgtags(msg-id).key == resub) {
      tokenize 32 $rawmsg
      .parseline -iqtn @ $+ $msgtags :jtv!jtv@tmi.twitch.tv PRIVMSG $3 :04 $+ $mTwitch.MsgTags($msgtags, system-msg)
      .signal mTwitch.ReSub $3 $msgtags(login).key $msgtags(msg-param-months).key $mid($4-, 2-)
      halt
      } else {
      ; echo -s $msgtags +++ 
    }
    if ($msgtags(msg-id).key == submysterygift) {
      tokenize 32 $rawmsg
      .parseline -iqtn @ $+ $msgtags :jtv!jtv@tmi.twitch.tv PRIVMSG $3 :04 $+ $mTwitch.MsgTags($msgtags, system-msg)
      .signal mTwitch.Mgift $3 $msgtags(login).key $msgtags(msg-param-months).key $mid($4-, 2-)
      halt
    }
    if ($msgtags(msg-id).key == subgift) {
      tokenize 32 $rawmsg
      .parseline -iqtn @ $+ $msgtags :jtv!jtv@tmi.twitch.tv PRIVMSG $3 :04 $+ $mTwitch.MsgTags($msgtags, system-msg)
      .signal mTwitch.Gift $3 $msgtags(msg-param-recipient-user-name).key $msgtags(login).key $mid($4-, 2-)
      halt
    }
    if ($msgtags(msg-id).key == sub) {
      tokenize 32 $rawmsg
      .parseline -iqtn @ $+ $msgtags :jtv!jtv@tmi.twitch.tv PRIVMSG $3 :04 $+ $mTwitch.MsgTags($msgtags, system-msg)
      .signal mTwitch.Sub $3 $msgtags(login).key $msgtags(msg-param-months).key $mid($4-, 2-)
      halt
    }
    if ($msgtags(msg-id).key == raid) {
      tokenize 32 $rawmsg
      .parseline -iqtn @ $+ $msgtags :jtv!jtv@tmi.twitch.tv PRIVMSG $3 :04 $+ $mTwitch.MsgTags($msgtags, system-msg)
      .signal mTwitch.Raid $3 $msgtags(display-name).key $msgtags(msg-param-viewerCount).key $mid($4-, 2-)
      halt
    }
    if ($msgtags(msg-id).key == giftpaidupgrade) {
      tokenize 32 $rawmsg
      .parseline -iqtn @ $+ $msgtags :jtv!jtv@tmi.twitch.tv PRIVMSG $3 :04 $+ $mTwitch.MsgTags($msgtags, system-msg)
      .signal mTwitch.Upgrade $3 $msgtags(display-name).key $mid($4-, 2-)
      halt
    }

I first made sure that all messages were written to the log, and then after reading it, I found out all the values that could be. After, I added it to mtwitch.core.mrc, nothing complicated.