dkf
public text v1 · immutablebind msgm - "!db*" db_proc
proc db_list_clean {} {
# do stuff here
return 0
}
proc db_proc { nick uhost handle text } {
if {[lindex $text 1] == "clean"} {
putquick "PRIVMSG $nick :cleaning the databse"
if {[catch {db_list_clean} temp]} {
putquick "PRIVMSG $nick :error - $msg"
foreach l [split $::errorInfo \n] {
putquick "PRIVMSG $nick :trace - $l"
}
} elseif {!$temp} {
putquick "PRIVMSG $nick :done"
} else {
putquick "PRIVMSG $nick :error"
}
}
}