mIRC Home    About    Download    Register    News    Help

Topic Options
#259795 - 27/01/17 01:52 AM (Twitch) Command make sure I'm a mod of the stream
GoldenTaco Offline
Nutrimatic drinks dispenser

Registered: 08/06/16
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...?

Top
#259819 - 30/01/17 01:35 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco]
Sakana Offline
Fjord artisan

Registered: 19/09/14
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

Top
#259821 - 01/02/17 01:33 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: Sakana]
GoldenTaco Offline
Nutrimatic drinks dispenser

Registered: 08/06/16
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.

Top
#259822 - 01/02/17 02:01 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco]
kikuchi Offline
Ameglian cow

Registered: 09/07/13
Posts: 24
Loc: Belgique
if $msgtags(mod).key { your code }

Top
#259863 - 06/02/17 07:13 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: kikuchi]
GoldenTaco Offline
Nutrimatic drinks dispenser

Registered: 08/06/16
Posts: 8
I need it to make sure I am a mod, not everyone, before a command is triggered

Top
#259869 - 07/02/17 01:35 AM Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco]
zapdos26 Offline
Ameglian cow

Registered: 05/07/16
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 }


Edited by zapdos26 (07/02/17 01:37 AM)
_________________________
Here is my multi channel bot smile https://github.com/zapdos26/mIRC-Twitchbot-Windows

Top
#260176 - 09/03/17 02:29 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: zapdos26]
GoldenTaco Offline
Nutrimatic drinks dispenser

Registered: 08/06/16
Posts: 8
Sorry for the late response, but this doesn't seem to be working with some of the commands I have smirk

Top
#260179 - 09/03/17 05:15 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: GoldenTaco]
wobY Offline
Ameglian cow

Registered: 18/10/16
Posts: 22
Loc: Croatia
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}
_________________________
My Twitch
My Twitter

Top
#260195 - 10/03/17 06:35 PM Re: (Twitch) Command make sure I'm a mod of the stream [Re: wobY]
GoldenTaco Offline
Nutrimatic drinks dispenser

Registered: 08/06/16
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.

Top