on *:start: {
hashfiles load
.enable #ontond_text
.enable #ontond_action
set -e %ontond_server off
set -e %ontond_targets off
}
on *:exit: { hashfiles save }
alias hashfiles {
var %dir = $mircdirData\
var %tables = ont ond ontond_targets ontond_servers
var %n = 1
if ($1 == load) {
while ($gettok(%tables,%n,32)) {
var %table = $v1
hmake %table
if ($isfile($+(%dir,%table,.hsh))) { hload -b %table $qt($+(%dir,%table,.hsh)) }
inc %n
}
}
elseif ($1 == save) {
while ($gettok(%tables,%n,32)) {
var %table = $v1
if ($hget(%table,1)) { hsave -b %table $qt($+(%dir,%table,.hsh)) }
inc %n
}
}
}