mIRC Home    About    Download    Register    News    Help

Print Thread
(Twitch) Command make sure I'm a mod of the stream #259795 27/01/17 01:52 AM
Joined: Jun 2016
Posts: 8
G
GoldenTaco Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2016
Posts: 8
Hi, I'm sure there's a simple script to make sure I am a moderator of the stream before any command is triggered or any sub script, but is there any way to do it so I won't have to edit already existing scripts that are inside my file?

And is it possible to make sure I'm looked at "as a moderator of the stream" and not as an "OP inside mIRC"....if that makes sense...?

Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco] #259819 30/01/17 01:35 PM
Joined: Sep 2014
Posts: 259
S
Sakana Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
if ($nick !isop #) { return }

place this line at teh start of any script. Should work, unless Twitch's pseudo-IRC works differently from when I last used it (not unlikely)

the 2nd thing in your post doesn't make sense

Re: (Twitch) Command make sure I'm a mod of the stream [Re: Sakana] #259821 01/02/17 01:33 PM
Joined: Jun 2016
Posts: 8
G
GoldenTaco Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2016
Posts: 8
What I meant by the second part was for mIRC to look for "the sword badge" instead of waiting for it to OP me inside mIRC.

Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco] #259822 01/02/17 02:01 PM
Joined: Jul 2013
Posts: 24
K
kikuchi Offline
Ameglian cow
Offline
Ameglian cow
K
Joined: Jul 2013
Posts: 24
if $msgtags(mod).key { your code }

Re: (Twitch) Command make sure I'm a mod of the stream [Re: kikuchi] #259863 06/02/17 07:13 PM
Joined: Jun 2016
Posts: 8
G
GoldenTaco Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2016
Posts: 8
I need it to make sure I am a mod, not everyone, before a command is triggered

Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco] #259869 07/02/17 01:35 AM
Joined: Jul 2016
Posts: 28
Z
zapdos26 Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Jul 2016
Posts: 28
Code:
raw USERSTATE:*:{
if ($me != $msgtags(display-name).key) { return }
if ($msgtags(mod.key) ==1) {
  %modkey = 1
 }
else { 
  %modkey = 0
 }
}

Then at the beginning of the command script have:
Code:
if (%modkey == 0) { return }

Last edited by zapdos26; 07/02/17 01:37 AM.
Re: (Twitch) Command make sure I'm a mod of the stream [Re: zapdos26] #260176 09/03/17 02:29 PM
Joined: Jun 2016
Posts: 8
G
GoldenTaco Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2016
Posts: 8
Sorry for the late response, but this doesn't seem to be working with some of the commands I have smirk

Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco] #260179 09/03/17 05:15 PM
Joined: Oct 2016
Posts: 22
W
wobY Offline
Ameglian cow
Offline
Ameglian cow
W
Joined: Oct 2016
Posts: 22
If the broadcaster uses the command it won't work since broadcaster doesn't count as a mod (http://prntscr.com/ehxguj). I'd recommend you to do something like this so broadcaster can use the commands as well:
Code:
if ($msgtags(mod).key == 1 || $msgtags(room-id).key == <Channel ID>) { ... }

or make the use of the "broadcaster/1" tag in badges.

If you don't have the channel ID you can get it with this: https://beta.decapi.me/twitch/id/{USER}

Re: (Twitch) Command make sure I'm a mod of the stream [Re: wobY] #260195 10/03/17 06:35 PM
Joined: Jun 2016
Posts: 8
G
GoldenTaco Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jun 2016
Posts: 8
Not that I'm looking for broadcasters to use any script. I need it so that if any commands are used, it checks that I am a moderator of the channel before it gives the command.