mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2015
Posts: 4
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Nov 2015
Posts: 4
I've build a twitch bot which worked perfectly fine. Since a few days i cannot execute my commands for mods and the admin. I've written the script again and also downloaded mirc again but it's still not working. As an example i have this code:

on *:TEXT:!admincommand:#: {
if ($nick !isaop #) { msg $chan $nick you are not a mod or admin
return }
msg $chan You are a mod or admin

I get " you are not a mod or admin".

Could someone help me? smirk

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Originally Posted By: Help Files
isaop if v1 is a user in your auto-op list for channel v2 (v2 optional)
change it to !isop


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Code:
alias isTwitchMod {
  return $iif($msgtags(user-type).key == mod || $mid(#, 2-) == $nick, $true)
}


on *:TEXT:!admincommand:#: {
  if ($isTwitchMod) {
    msg $chan $nick you are not a mod or admin 
  }
  else {
    msg $chan You are a mod or admin
  }
}


I am SReject
My Stuff
Joined: Nov 2015
Posts: 4
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Nov 2015
Posts: 4
Thanks alot! smile


Link Copied to Clipboard