mIRC Home    About    Download    Register    News    Help

Print Thread
#266880 26/02/20 09:41 PM
Joined: Jan 2020
Posts: 17
dah Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jan 2020
Posts: 17
Hello, I run my bot using mIRC coding that I moderate for on Twitch and I can't seem to get the subscription system to work. I'm using Blas subscription mIRC script for the bot I run on Twitch.
I was wondering if anybody has got an updated system that I can use? https://github.com/Blasman/mIRC-Twitch-Scripts/blob/master/Twitch_Subscriptions.mrc

The script I use which is Blas script code.
It works when someone gifted subs but doesn't work when someone subs for the first time or resubs, any ideas?

RAW USERNOTICE:#tehrani: {
; LOOK FOR TRIGGER: your Twitch channel && are subscription related
IF (($msgtags(room-id).key == 191409899) && ($istok(sub resub subgift submysterygift, $msgtags(msg-id).key, 32))) {
VAR %name $IIF($regex($msgtags(display-name).key, /^[a-z\d_]+$/ig), $msgtags(display-name).key, $msgtags(login).key)
VAR %msg-id $msgtags(msg-id).key
VAR %msg-param-cumulative-months $msgtags(msg-param-cumulative-months).key
VAR %msg-param-months $msgtags(msg-param-months).key
VAR %msg-param-streak-months $msgtags(msg-param-streak-months).key
VAR %msg-param-sub-plan $IIF($msgtags(msg-param-sub-plan).key isnum, $calc($msgtags(msg-param-sub-plan).key / 1000), $msgtags(msg-param-sub-plan).key)
; MASS SUB GIFTER ALERT: thank the person who gifted the subs and prevent messages for each individual sub
IF (%msg-id == submysterygift) {
VAR %msg-param-mass-gift-count $msgtags(msg-param-mass-gift-count).key
INC %submysterygift. $+ %name %msg-param-mass-gift-count
MSG $1 %name just gifted %msg-param-mass-gift-count tier %msg-param-sub-plan subscriptions to the community! nickmercsGIFT
ELSEIF (%msg-id == sub) {
IF (%msg-param-sub-plan isnum) MSG $1 %name just subscribed at tier %msg-param-sub-plan $+ tehranLove
ELSEIF (%msg-param-sub-plan == Prime) MSG $1 %name just subscribed with Twitch Prime! tatPrime
ELSEIF (%msg-id == resub) {
IF (%msg-param-sub-plan isnum) VAR %msg_resub %name just re-subscribed at tier %msg-param-sub-plan $+ $chr(44) tehranLove
ELSEIF (%msg-param-sub-plan == Prime) VAR %msg_resub %name just re-subscribed using Twitch Prime $+ $chr(44) tatPrime
IF (%msg-param-cumulative-months > 1) VAR %msg_resub %msg_resub and has been subscribed for a total of %msg-param-cumulative-months months $+ $chr(44)
IF (%msg-param-streak-months > 1) VAR %msg_resub %msg_resub and is on a %msg-param-streak-months month sub streak $+ $chr(44)
MSG $1 $left(%msg_resub,-1) $+
ELSEIF (%msg-id == subgift) {
; IF the receiver of the Gifted Sub is the ONLY PERSON to be gifted a sub (ie it's NOT a Mass Sub Gift of two or more) then we WILL display a message in chat
IF (!$($+(%,submysterygift.,%name),2)) {
VAR %name_gifted_to $IIF($regex($msgtags(msg-param-recipient-display-name).key, /^[a-z\d_]+$/ig), $msgtags(msg-param-recipient-display-name).key, $msgtags(msg-param-recipient-user-name).key)
MSG $1 %name just GIFTED a tier %msg-param-sub-plan subscription to %name_gifted_to $+ ! $IIF(%msg-param-months > 1, It is their %msg-param-months month sub anniversary!, $null)
; ELSE the receiver of the Gifted Sub is part of a Mass Sub Gift, therefor we display NOTHING in chat to prevent spam!
DEC %submysterygift. [ $+ [ %name ] ]
IF (!$($+(%,submysterygift.,%name),2)) UNSET %submysterygift. [ $+ [ %name ] ]

Joined: Jul 2020
Posts: 2
Bowl of petunias
Bowl of petunias
Joined: Jul 2020
Posts: 2
I think the problem here is anything about twitch and IRC is all but ignored.

I read somewhere that twitch uses a "basic" but not 100% IRC complient custom server..

I have 3 IRC clients, all can connect to twitch chat and can chat back and forth, but the userlist only ever shows my bot in the clients userlist, no guest names show up.

But on twitch chat all the names are there, i'm only awear of a user in chat if they type something.. then their name shows up and there chat text too... but the username list doesnt show them.

I suspect this non complient irc service is the source of the problem, and twitchs custom commands.

searching google for mirc and twitch only shows videos from about 2013 at the latest.. so i assume most people only now use custom IRC code or preprogrammed bots for twitch that use the new command structure .

Why twitch cant include or leave in backwards compatibility for old complient IRC clients is beyond me..
They also added oauth so i assume security mite be involved for why the non standard code was added plus custom twitch commands too were added.

Link Copied to Clipboard