Changeset 835 for trunk/modules/mood.tcl

Show
Ignore:
Timestamp:
07/29/07 17:41:03 (18 months ago)
Author:
james
Message:

guard the mood set code against old TCL versions which lack -inline option for lsearch (related to #137)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/mood.tcl

    r678 r835  
    230230 
    231231        if {[regexp -nocase {set ([^ ]+) ([0-9]+)} $arg matches moodname moodval]} { 
     232                if {[info tclversion] < 8.4} { 
     233                        bMotion_putadmin "Sorry, the mood set command needs TCL >= 8.4 :/" 
     234                        return 
     235                } 
     236 
    232237                if {!([lsearch -inline {happy horny lonely electricity stoned} $moodname] == $moodname)} { 
    233238                        bMotion_putadmin "Unknown mood type '$moodname'"