Im writing a script which checks the userfile for entries more than 30 days old an deletes them.
I cant really seem to find it in the docs but i assume from the wording that using timer or utimer will trigger then event once and then stop the timer, so how do i go about making it repeat every x seconds?
an example of the current script is:
thanksbind EVNT - loaded timer_loaded
proc timer_loaded {type} {
global H4exphandcheck H4exphandtime
timer $H4exphandcheck {
putlog "Checking for expired users"
foreach handcheck [userlist] {
if { [getuser $handcheck XTRA lastlogin] < [expr [unixtime]-$H4exphandtime] } {
putlog "Deleted handle $handcheck because it expired"
deluser $handcheck
foreach a [channels] {
if { [matchattr $handcheck -|n $a] == 1 } {
putlog "Deleted channel $a because owner handle expired"
channel remove $a
}
}
}
}
}
}
Simon