Changeset 1019 for trunk/plugins/en/output_NUMBER.tcl
- Timestamp:
- 08/23/09 19:22:05 (3 years ago)
- File:
-
- 1 edited
-
trunk/plugins/en/output_NUMBER.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/output_NUMBER.tcl
r961 r1019 1 #2 #3 1 # vim: fdm=indent fdn=1 4 2 # … … 6 4 ############################################################################### 7 5 # This is a bMotion plugin 8 # Copyright (C) James Michael Seward 2000-200 86 # Copyright (C) James Michael Seward 2000-2009 9 7 # 10 8 # This program is covered by the GPL, please refer the to LICENCE file in the … … 21 19 bMotion_putloglev 4 * "bMotion_plugin_output_NUMBER $channel $line" 22 20 23 set lastline ""24 25 21 set padding 0 26 while{[regexp "%NUMBER\{(\[0-9\]+)\}(\{(\[0-9\]+)\})?" $line matches numberString paddingOpt padding]} {22 if {[regexp "%NUMBER\{(\[0-9\]+)\}(\{(\[0-9\]+)\})?" $line matches numberString paddingOpt padding]} { 27 23 set var [bMotion_get_number [bMotion_rand_nonzero $numberString]] 28 24 if {$padding > 0} { … … 33 29 set line [bMotionInsertString $line "%NUMBER\\{$numberString\\}(\\{\[0-9\]+\\})?" $var] 34 30 set padding 0 35 36 if {$lastline == $line} {37 putlog "bMotion: ALERT! unable to process %NUMBER in $line (dropping output)"38 set line ""39 break40 }41 set lastline $line42 31 } 43 32
Note: See TracChangeset
for help on using the changeset viewer.
