I'm having a problem with a proc in my script. It's causing the bots to put a strain on the cpu, so I was wondering if there is a way I could phrase it better in order to be kinder to the shell. I have dozens of bots running the script and can't afford for them to be so crude with resources.
bind time - "*0 * * * *" si_logcheck
proc si_logcheck {min hour day month year} {
foreach logged [userlist L] {
chattr $logged -LD
if {[matchattr $logged B]} {
chattr $logged +L
}
foreach channel [channels] {
if {[handonchan $logged $channel]} {
chattr $logged +L
}
}
}
unset logged
return 1
}
Basically, I want to periodically (no less often than every 15 minutes) make sure that no user retains flag L unless they are online. This is a security flag, and should allow time for the user to quit and return. I'd appreciate any suggestions.
- Tom
http://www.botservice.net