Code: Select all
###
# MySQL variables:
###
## hostname
set db(host) ""
## user
set db(id) ""
## password
set db(pass) ""
## database
set db(dbase) ""
## table
#set db(table) ""
load libmysqltcl3.01.so
set mysql(libsql) "home/user/libmysqltcl3.01.so"
# --------------------------------------------------------------------
# binding
# --------------------------------------------------------------------
bind pubm - !seen seen
Code: Select all
#### seen
proc seen {nick uhost handle channel arg} {
global db
set sqlhand [mysqlconnect -host $db(host) -user $db(id) -password $db(pass)]
mysqluse $sqlhand $db(dbase)
mysqlexec $sqlhand "SELECT NICK, LEAVETIME FROM MYDB WHERE NICK LIKE '%$arg%'"
mysqlclose $sqlhand
I would say u nailed it.so, basically, you want to make your own script without really knowing what you're actually doing, just by copy & paste stuff from other scripts?
You're right that i should start learn to cide myself, but this is basically a Script Requests forum and that is what i did. It's just not need to learn to code if u only need it for one script. I think my request is not really difficult for somebody who is use to program in tcl.you are in dire need to R T F M first
I already told you how to obtain the time difference; what you need to do is read tcl-commands.doc and find out about [duration]
also, read mysqltcl's docs (google for "mysqltcl"); the way you use it by loading that library directly is wrong, you should use [package require]