Posted to tcl by ybloc at Sat Jan 20 20:53:51 GMT 2024view raw
- ######################################
- ### Timer for the mysql connection ###
- ######################################
- if {[timerexists pre:dbconnection] !=""} { killtimer $dbconnect(dbtimer) }
- set dbconnect(dbtimer) [timer 1 pre:dbconnection]
- proc pre:dbconnection {} {
- global mysql_ dbconnect
- if {[catch {mysqlping $mysql_(handle)}] != 0} {
- set mysql_(handle) [mysqlconnect -host $mysql_(host) -user $mysql_(user) -password $mysql_(password) -db $mysql_(database)]
- }
- if {[set var [timerexists pre:dbconnection]] !="" } { killtimer $var }
- set dbconnect(dbtimer) [timer 1 pre:dbconnection]
- }
- #if {[file exists /usr/lib/mysqltcl-3.02/libmysqltcl3.02.so]} {
- # load /usr/lib/mysqltcl-3.02/libmysqltcl3.02.so
- #}
- ####################################END OF SCRIPT###############################
- Tcl error in file 'eggdrop.conf':
- invalid command name "timerexists"
- while executing
- "timerexists pre:dbconnection"
- (file "scripts/pre.tcl" line 1783)
- invoked from within