here is the onjoin code, would some1 to be ble to adapt it to work on part
Code: Select all
load /xxxxxxxxxxx/mysqltcl/libmysqltcl2.30.so
package require mysqltcl
set db_handle TOOK THIS BIT OUT
# main strings
bind pub - !user ircjoin
#setudef flag testing
proc ircjoin { nick host handle channel text } {
global db_handle quote_noflags
# if {![channel get $channel testing]} {
# return 0
# }
# if [matchattr $handle $quote_noflags] { return 0 }
# if {($handle == "") || ($handle == "*")} {
# set handle $nick
# }
set sql "UPDATE users SET onirc = 'yes' WHERE username = '$nick'"
putloglev d * "ircstats: executing $sql"
set result [mysqlexec $db_handle $sql]
if {$result != 1} {
putlog "An error occurred with the sql :("
} else {
set id [mysqlinsertid $db_handle]
puthelp "PRIVMSG $channel :User Online \002$nick\002 added"
}
}