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

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

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 }