forked from hummypkg/webif
16 lines
343 B
Plaintext
16 lines
343 B
Plaintext
|
|
proc eval_plugins {hook {verbose 0}} {
|
|
foreach plugin [lsort [glob -nocomplain /mod/webif/plugin/*]] {
|
|
if {[file exists "$plugin/.disabled"]} continue
|
|
if {[file isfile "$plugin/$hook.hook"]} {
|
|
if {[catch \
|
|
{uplevel source "$plugin/$hook.hook"} msg]} {
|
|
if {$verbose} {
|
|
puts "$plugin/$hook - $msg"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|