mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2014
Posts: 40
Feyl0rd Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2014
Posts: 40
So for the longest time my "bot" has been using the "points" script that is floating around here on the forums that allows people to earn "points" as long as they are connected to the IRC channel.

However, with the growth of the channel the amount of timers are getting out of hand and are now bogging down mIRC. So to work around having multiple timers I aim to move to just one that after a set time flushes out "points" to everyone connected to the channel at the time the "flush" happens.

This would be super beneficial in clearing up some memory for mIRC as well as increase response time. So what I'm asking is:

Code:
Is there a way to gather all of the nicks in the channel
Take the name at the top for example, run a script
Move down to the next nick and do the same
Looping through until done?

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Code:
var %i = 1
while ($nick(#,%i)) {
  var %nick = $v1
  inc %i
}

Joined: Dec 2014
Posts: 40
Feyl0rd Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2014
Posts: 40
Thank-you! After some tweaking it went from 50 lines down to 12. Which is awesome. Thanks. My next goal is to round out the response time by going through and "purging" anyone bellow 5 points in the ini file. Would I use the same kind of loop? Where... points is less than or equal to five? The ini file is structured like this:
Code:
[#CHANNEL.NICK]
Points=79436


Link Copied to Clipboard