mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2016
Posts: 8
G
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...?

Joined: Sep 2014
Posts: 259
S
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

Joined: Jun 2016
Posts: 8
G
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.

Joined: Jul 2013
Posts: 27
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Jul 2013
Posts: 27
if $msgtags(mod).key { your code }

Joined: Jun 2016
Posts: 8
G
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

Joined: Jul 2016
Posts: 28
Z
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.
Joined: Jun 2016
Posts: 8
G
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

Joined: Oct 2016
Posts: 22
W
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}

Joined: Jun 2016
Posts: 8
G
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.


Link Copied to Clipboard