mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2014
Posts: 3
W
Woo991 Offline OP
Self-satisified door
OP Offline
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.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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
Joined: Nov 2014
Posts: 3
W
Woo991 Offline OP
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Nov 2014
Posts: 3
thanks so much! I really cant thank enough!


Link Copied to Clipboard