mIRC Home    About    Download    Register    News    Help

Print Thread
#254934 10/09/15 12:16 AM
Joined: Sep 2015
Posts: 26
Z
zigress Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Sep 2015
Posts: 26
Hey all. I'm a mod that operates the bot on a twitch channel that recently got a sub button.
I was wondering: how can I make some commands subscribers only, just like one can make some commands mod only by using "isop?"
For example, I would use this on list commands so the streamer could play with subs only on some days instead of allowing any random viewer to join the list.

Thanks in advance! Any help would be appreciated.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I highly recommend you use Froggie's mTwitchNormalizer project : http://hawkee.com/snippet/16487/

Using these modules you can call for $msgtags in your text events. This returns a line similar to:
Quote:
color=#FF6BD8;display-name=Nillens;emotes=9:0-1;subscriber=1;turbo=0;user-type=mod

You can either check for subscriber=1 isin $msgtags or you can try to fiddle out the subscriber=1 by tokenizing the string by ; and checking wether subscriber = 1 or = 0


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Sep 2015
Posts: 26
Z
zigress Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Sep 2015
Posts: 26
Thanks for the link. I just checked it out, but "mTwitch.UserModeState.mrc" seems to not have a hyperlink to anything.

Last edited by zigress; 15/09/15 05:57 AM. Reason: I was confused at first but understand what you meant now.

Link Copied to Clipboard