Changeset 1053 for trunk


Ignore:
Timestamp:
11/15/09 19:01:05 (3 years ago)
Author:
james
Message:

support :prev option on VAR
commit message is commit

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/abstracts/en/randomstuff.tcl

    r1039 r1053  
    66### Used when the channel is not 'active' (default > 300s since last line) 
    77bMotion_abstract_register "randomStuff" { 
     8        "%VAR{adjective} %VAR{sillyThings:strip} is %VAR{adjective:prev}" 
     9        "%VAR{nice_adjective} %VAR{sillyThings:strip} is %VAR{nice_adjective:prev}" 
    810        "ok, we've got the hot tub hot, the wine cooler's cool: it's %VAR{sillyThings:strip} time!" 
    911        "eww! i touched my own %VAR{bodypart}!" 
  • trunk/plugins/en/output_VAR.tcl

    r1043 r1053  
    2525        bMotion_putloglev 4 * "bMotion_plugin_output_VAR $channel $line" 
    2626        global BMOTION_MIXIN_NONE BMOTION_MIXIN_REVERSE BMOTION_MIXIN_DEFAULT BMOTION_MIXIN_BOTH 
    27  
     27         
    2828        set line [string map { "%noun" "%VAR{sillyThings}" } $line] 
    2929 
     
    107107                foreach option $options_list { 
    108108                        switch $option { 
     109                                "prev" { 
     110                                        set replacement [bMotion_plugins_settings_get "output:VAR" "last" $channel "$abstract"] 
     111                                } 
    109112                                "strip" { 
    110113                                        set replacement [bMotion_strip_article $replacement] 
     
    146149                        return "" 
    147150                } 
     151 
     152                bMotion_plugins_settings_set "output:VAR" "last" $channel $abstract $replacement 
    148153                set line [string replace $line $location [expr $location + [string length $matches] - 1] $replacement] 
    149154 
Note: See TracChangeset for help on using the changeset viewer.