Changeset 1031 for trunk/plugins/en/output_VAR.tcl
- Timestamp:
- 09/11/09 05:40:45 (3 years ago)
- File:
-
- 1 edited
-
trunk/plugins/en/output_VAR.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/output_VAR.tcl
r1029 r1031 24 24 proc bMotion_plugin_output_VAR { channel line } { 25 25 bMotion_putloglev 4 * "bMotion_plugin_output_VAR $channel $line" 26 global BMOTION_MIXIN_NONE BMOTION_MIXIN_REVERSE BMOTION_MIXIN_DEFAULT 26 27 27 28 set line [string map { "%noun" "%VAR{sillyThings}" } $line] … … 30 31 regsub {%VAR\{([^\}]+)\}\{strip\}} $line "%VAR{\\1:strip}" line 31 32 32 if {[regexp -nocase {(%VAR\{([^\}:]+)(: [^\}]+)?\}(\{strip\})?)} $line matches whole_thing abstractoptions clean]} {33 if {[regexp -nocase {(%VAR\{([^\}:]+)(:([^\}]+))?\}(\{strip\})?)} $line matches whole_thing abstract 1 options clean]} { 33 34 global $abstract 35 36 bMotion_putloglev 1 * "options for $abstract are $options" 37 38 # check options 39 if {$options != ""} { 40 set options_list [split $options ","] 41 } else { 42 set options_list [list] 43 } 44 bMotion_putloglev 1 * "options list is $options_list" 45 46 if {$clean == "{strip}"} { 47 lappend options_list "clean" 48 } 49 50 set mixin_type $BMOTION_MIXIN_DEFAULT 51 52 if {[lsearch $options_list "revmixin"] > -1} { 53 bMotion_putloglev 1 * "mixin type for $abstract is reverse" 54 set mixin_type $BMOTION_MIXIN_REVERSE 55 } elseif {[lsearch $options_list "nomixin"] > -1} { 56 bMotion_putloglev 1 * "mixin type for $abstract is none" 57 set mixin_type $BMOTION_MIXIN_NONE 58 } 59 34 60 #see if we have a new-style abstract available 35 set newText [bMotion_abstract_get $abstract ]61 set newText [bMotion_abstract_get $abstract $mixin_type] 36 62 set replacement "" 37 63 if {$newText == ""} { … … 49 75 } 50 76 51 # check options52 set options [string range $options 1 end]53 if {$options != ""} {54 set options_list [split $options ","]55 } else {56 set options_list [list]57 }58 59 if {$clean == "{strip}"} {60 lappend options_list "clean"61 }62 77 63 78 if {[lsearch $options_list "strip"] == -1} { … … 131 146 } 132 147 148 133 149 bMotion_plugin_add_output "VAR" bMotion_plugin_output_VAR 1 "en" 3
Note: See TracChangeset
for help on using the changeset viewer.
