mIRC Homepage

listing all active admins for a twitch bot

Posted By: Woo991

listing all active admins for a twitch bot - 08/11/14 10:00 PM

I have made a bot that sets a variable for any admins that talk in chat and deletes itself after a certain time to know when the admin is active or not(a lot of admins go afk in chat and wont respond even being in chat) and the variables work fine. I feel like the way the variables are setup will need to be changed completely. however here is the code I have used

Code:
on *:text:*:#:{
  if ($nick isop #) {
    set -u120 %activeadmin. $+ $nick
  }
}

so I can detect when an admin is online great but I need to list all the variables with %activeadmin. at the beginning so if someone where to type !admins the bot would respond with a short message and all the active admins to alert the admins(the chat turns red when you say their name).
any tips? I really cannot find any to help me with what I am wanting to do.
Posted By: Nillen

Re: listing all active admins for a twitch bot - 08/11/14 10:31 PM

Code:
on *:text:!admins:#: { 
var %file admins.ini
var %i $ini(%file,#,0)
while (%i) {
var %nick $ini(%file,#,%i)
var %n %n %nick
dec %i
}
msg # Active admins: %n
}

on *:text:*:#: { 
if ($nick isop #) {
var %file admins.ini
if (!$readini(%file,#,$nick)) writeini %file # $nick 1 
.timerAdmin. $+ $nick 1 120 remini %file # $nick
}
}
Posted By: Woo991

Re: listing all active admins for a twitch bot - 08/11/14 11:53 PM

thanks so much! I really cant thank enough!
© 2019 mIRC Discussion Forums