mIRC Home    About    Download    Register    News    Help

Print Thread
listing all active admins for a twitch bot #248980
08/11/14 10:00 PM
08/11/14 10:00 PM
Joined: Nov 2014
Posts: 3
W
Woo991 Offline OP
Self-satisified door
Woo991  Offline OP
Self-satisified door
W

Joined: Nov 2014
Posts: 3
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.

Re: listing all active admins for a twitch bot [Re: Woo991] #248981
08/11/14 10:31 PM
08/11/14 10:31 PM
Joined: Dec 2013
Posts: 779
Sweden
N
Nillen Offline
Hoopy frood
Nillen  Offline
Hoopy frood
N

Joined: Dec 2013
Posts: 779
Sweden
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
}
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: listing all active admins for a twitch bot [Re: Nillen] #248982
08/11/14 11:53 PM
08/11/14 11:53 PM
Joined: Nov 2014
Posts: 3
W
Woo991 Offline OP
Self-satisified door
Woo991  Offline OP
Self-satisified door
W

Joined: Nov 2014
Posts: 3
thanks so much! I really cant thank enough!