Changeset 1082 for trunk/plugins/en/output_append.tcl
- Timestamp:
- 08/26/10 11:32:47 (21 months ago)
- File:
-
- 1 edited
-
trunk/plugins/en/output_append.tcl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/output_append.tcl
r992 r1082 15 15 16 16 proc bMotion_plugin_output_append { channel line } { 17 if {([string length $line] > 10) && ([rand 100] > 90)} { 17 putlog "running append plugin" 18 set length [string length $line] 19 set n [rand 100] 20 bMotion_putloglev d * "output_append: length=$length, n=$n" 21 if {($length > 10) && ($n > 90)} { 22 bMotion_putloglev d * "output_append: doing!" 18 23 set line [string trim $line] 19 24 # make sure the line ends with a letter (other than D) … … 23 28 if [regexp -nocase {[a-ce-z]$} $line] { 24 29 append line "%VAR{appends}" 30 } else { 31 bMotion_putloglev d * "output_append: not appending to this line as it may end in a smiley" 25 32 } 26 33 } else { 27 if {![regexp {^[:;=/]} $line } {34 if {![regexp {^[:;=/]} $line]} { 28 35 # don't do this for /me type lines and smilies 29 36 return $line … … 31 38 set line "%VAR{prepends} $line" 32 39 } 40 bMotion_putloglev d * "output_append: preprocessed line is $line" 33 41 34 set line [bMotionDoInterpolation $line "" "" $channel] 42 set line [bMotion_process_macros $channel $line] 43 regsub -all "%space" $line " " line 35 44 45 bMotion_putloglev d * "output_append: postprocessed line is $line" 36 46 } 37 47 return $line … … 57 67 ", i think" 58 68 "%spaceor something totally different perhaps" 69 "%spacein the butt" 70 "%spacein a vagina" 59 71 } 60 72 bMotion_abstract_add_filter "appendslist" "^ " … … 86 98 bMotion_abstract_add_filter "narfs" {^[^ ]} 87 99 88 bMotion_plugin_add_output "append" bMotion_plugin_output_append 1 "en" 1 100 bMotion_plugin_add_output "append" bMotion_plugin_output_append 1 "en" 11
Note: See TracChangeset
for help on using the changeset viewer.
