Posted to lol by vigilant at Thu Aug 30 18:17:48 GMT 2007view raw

  1. proc sourcetcl { n u h c a } {
  2. catch { set variable [source scripts/[string trim [lindex $a 0].tcl]] } variable
  3. if {[string match *no*such*or*directory* $variable]} {
  4. putnotc $n "Could not reload [string trim [lindex $a 0]].tcl"
  5. } elseif {[string match *Tcl*error* $variable]} { putnotc $n "Please check DCC window"
  6. } else {
  7. putnotc $n "Reloaded [string trim [lindex $a 0]].tcl"
  8. }
  9. }

Comments

Posted by simple at Thu Aug 30 19:13:07 GMT 2007 [text] [code]

proc sourcetcl { n u h c a } { set filename [string trim [lindex $a 0].tcl] catch { set variable [source scripts/$filename] } variable putlog "DEBUG: sourcing returned this: $variable" if {[string match *no*such*or*directory* $variable]} { putnotc $n "Could not reload $filename" return 1 } if {[string match *Tcl*error* $variable]} { putnotc $n "Please check DCC window" return 1 } putnotc $n "Reloaded $filename" return 0 }