mIRC Home    About    Download    Register    News    Help

Print Thread
#260549 10/05/17 10:37 PM
Joined: Jul 2016
Posts: 10
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2016
Posts: 10
Hey i was wondering if anyone could help, twitch is swapping over the usernotice system, replacing twitch notify for new subs. Im not sure how i would modify my code so that it works on this system.

This is what i use right now:

on *:LOGON:*:{
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands
/debug @raw
}

on 1:TEXT:*subscribed*:#couragejd:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { describe $chan NEW SUB!! bingOMG $1 welcome to the Courageous!! bingHeart $+ }
}


raw USERNOTICE:*:{
if (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart
}
else {
describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart Left a note: $qt($2-)
}
}

}


If anyone could help that would be great.

Last edited by KeviSkillz; 11/05/17 12:03 AM.
Joined: Jul 2016
Posts: 28
Z
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Code:
raw USERNOTICE:*:{
 if (($msgtags(msg-id).key == sub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  describe $1 NEW SUB!! bingOMG %nick welcome to the Courageous!! bingHeart 
 }
 elseif (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  if ($0 == 1) {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart
  }
  else {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart Left a note: $qt($2-) 
  }
 }
}

Joined: May 2017
Posts: 3
J
Self-satisified door
Offline
Self-satisified door
J
Joined: May 2017
Posts: 3
Originally Posted By: zapdos26
Code:
raw USERNOTICE:*:{
 if (($msgtags(msg-id).key == sub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  describe $1 NEW SUB!! bingOMG %nick welcome to the Courageous!! bingHeart 
 }
 elseif (($msgtags(msg-id).key == resub) && ($1 == #couragejd)) {
  var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
  if ($0 == 1) {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart
  }
  else {
   describe $1 bingOMG RESUB!! %nick with the $msgtags(msg-param-months).key months in a row! bingHeart Left a note: $qt($2-) 
  }
 }
}


Sorry for hijacking this thread.

I'm trying to set up an automsg for subs & resubs, and tried this without success.

I have used multiple scripts, and they either don't work, or only work for new subs, sometimes for prime, and never for resubs or if they include a message in their sub.

I'm not trying to use the twitchnotify check, as Twitch are getting rid of this and require you to use the room id, as new subs will not send USERNOTICE any more.

If anyone has a working script for this, please let me know! Thanks

Joined: Jul 2016
Posts: 10
K
Pikka bird
OP Offline
Pikka bird
K
Joined: Jul 2016
Posts: 10
I tried this and it worked perfectly, thank you for helping zapdos <3

Joined: Jul 2016
Posts: 28
Z
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
NP smile

Joined: May 2017
Posts: 3
R
Self-satisified door
Offline
Self-satisified door
R
Joined: May 2017
Posts: 3
not sure whats going wrong could u help me out and tell me what i need to fix heres my code( i used your code just changed it for the channel im doing it for) https://pastebin.com/UhLCPW5Q

Joined: Jul 2016
Posts: 28
Z
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Could you possible post what the message should say?

Joined: May 2017
Posts: 3
R
Self-satisified door
Offline
Self-satisified door
R
Joined: May 2017
Posts: 3
i worked it out and it seems to work. the way i fixed it was that i would only put that code in a separate code file. TIP* put the code in a new file and keep it to its self. btw zapos thx for the code

Joined: Jul 2016
Posts: 28
Z
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
NP smile


Link Copied to Clipboard