Ignore:
Timestamp:
01/16/10 09:06:36 (2 years ago)
Author:
james
Message:

factorise code for using s instead of /me
don't do
s if the action starts with a "." (it'll be a "think")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/output.tcl

    r1057 r1062  
    114114        bMotion_putloglev 5 * "mee ($channel, $action, $urgent)" 
    115115        set channel [chandname2name $channel] 
     116        regsub "^\"(.+)\"?$" $action {\1} action 
     117        if {([string index $action 0] != ".") && ([rand 10] == 0)} { 
     118                set action "*$action*" 
     119        } else { 
     120                set action "\001ACTION $action\001" 
     121        } 
     122 
    116123        if {$urgent} { 
    117                 if [rand 10] { 
    118                         bMotion_queue_add_now $channel "\001ACTION $action\001" 
    119                 } else { 
    120                         bMotion_queue_add_now $channel "*$action*" 
    121                 } 
     124                bMotion_queue_add_now $channel $action 
    122125        } else { 
    123                 if [rand 10] { 
    124                         bMotion_queue_add $channel "\001ACTION $action\001" 
    125                 } else { 
    126                         bMotion_queue_add $channel "*$action*" 
    127                 } 
     126                bMotion_queue_add $channel $action 
    128127        } 
    129128} 
Note: See TracChangeset for help on using the changeset viewer.