mIRC Home    About    Download    Register    News    Help

Print Thread
Bot is not detecting op status #255657 11/11/15 06:37 PM
Joined: Nov 2015
Posts: 4
L
Lakyluke98 Offline OP
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

Re: Bot is not detecting op status [Re: Lakyluke98] #255660 11/11/15 10:51 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: Bot is not detecting op status [Re: Lakyluke98] #255661 11/11/15 10:58 PM
Joined: Apr 2010
Posts: 966
F
FroggieDaFrog Offline
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 966
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
Re: Bot is not detecting op status [Re: Lakyluke98] #255901 30/11/15 04:30 PM
Joined: Nov 2015
Posts: 4
L
Lakyluke98 Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Nov 2015
Posts: 4
Thanks alot! smile