Changeset 1019 for trunk/modules/plugins.tcl
- Timestamp:
- 08/23/09 19:22:05 (3 years ago)
- File:
-
- 1 edited
-
trunk/modules/plugins.tcl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/plugins.tcl
r1004 r1019 284 284 # Sorted by priority then name 285 285 # Includes plugins only enabled for the given channel 286 proc bMotion_plugin_find_output { lang { channel "" } { min_priority 0} { max_priority 100 } } {286 proc bMotion_plugin_find_output { lang { channel "" } { min_priority 0} { max_priority 100 } {name "" } } { 287 287 global bMotion_plugins_output botnicks 288 288 global bMotion_plugins_output_perchan … … 296 296 set language [lindex $val $BMOTION_PLUGIN_OUTPUT_LANGUAGE] 297 297 set priority [lindex $val $BMOTION_PLUGIN_OUTPUT_PRIORITY] 298 if {($priority >= $min_priority) && ($priority <= $max_priority)} { 299 if {[string match $lang $language] || ($language == "any")|| ($language == "all")} { 300 if {$enabled == 1} { 301 lappend result [list $callback $priority] 302 } else { 303 bMotion_putloglev 1 * "Searching $key for channel $channel" 304 if {$channel != ""} { 305 catch { 306 set chanlist $bMotion_plugins_output_perchan($key) 307 if {[lsearch $chanlist $channel] > -1} { 308 lappend result [list $callback $priority] 309 bMotion_putloglev d * "Plugin $key is enabled for $channel" 310 } 311 } 298 299 if {($name != "") && ($name != $key)} { 300 bMotion_putloglev 3 * "macro: ignoring $key on name" 301 continue 302 } 303 304 if {!(($priority >= $min_priority) && ($priority <= $max_priority))} { 305 bMotion_putloglev 3 * "macro: ignoring $key on priority" 306 continue 307 } 308 309 if {!([string match $lang $language] && ($language != "any") && ($language != "all"))} { 310 bMotion_putloglev 3 * "macro: ignoring $key on language" 311 bMotion_putloglev 3 * "macro: plugin is $lang, want $language" 312 continue 313 } 314 315 if {$enabled == 1} { 316 lappend result [list $callback $priority] 317 } else { 318 bMotion_putloglev 1 * "Searching $key for channel $channel" 319 if {$channel != ""} { 320 catch { 321 set chanlist $bMotion_plugins_output_perchan($key) 322 if {[lsearch $chanlist $channel] > -1} { 323 lappend result [list $callback $priority] 324 bMotion_putloglev d * "Plugin $key is enabled for $channel" 312 325 } 313 326 }
Note: See TracChangeset
for help on using the changeset viewer.
