Hey there,
New to mIRC, and trying to get an automessage out every time someone subs or resubs. The current code I have works fine for new subs, but does not work for resubs and does not work if they include a message to their share.
I've tried multiple scripts without luck.
My current code is
on *:connect:{
if ($server = tmi.twitch.tv) {
; Requesting capabilities is necessary to recive the info
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands
}
}
on 1:text:*subscribed*:#channel: {
if ($nick == twitchnotify) && ($istok($1-,subscribed to,32)) halt
elseif ($nick == twitchnotify) && ( $4 == $null ) { msg $chan /me Thanks for subscribing $1! }
elseif ($nick == twitchnotify) && ( $4 == with ) { msg $chan /me Thanks for subscribing $1! }
}
raw USERNOTICE:*:{
if (($msgtags(msg-id).key == resub) && ($1 == #channel)) {
var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
if ($0 == 1) {
msg $1 /me Thanks %nick for subscribing $msgtags(msg-param-months).key months in a row!
}
else {
msg $1 /me Thanks %nick for subscribing $msgtags(msg-param-months).key months in a row!
}
}
}
As I mentioned, this works fine for new subs and prime subs, but not for resubs or subs with a message.
Appreciate all help