I've made this script which is running under Eggdrop v1.6.21, but I can't get it to start. The error I'm receiving is:
Tcl error in file 'eggdrop.conf':
wrong # args: should be "proc name args body"
while executing
"proc logit {nick host handle channel text} {
What could be the problem? This is my script.
package require mysqltcl
set port {3306}
set host {127.0.0.1}
set user {database_user}
set password {database_password}
set db {database_name}
bind pubm - "*" logit
proc logit {nick uhost handle channel text} {
global port
global host
global user
global password
global db
if {[string match {database_name}} $channel] == 0} {
set mysql_handler [mysqlconnect -host $host -port $port -user $user -password $password -db $db]
set sql "insert into irc_feed (nickname, host, message) values ('[mysqlescape $nick]', '[mysqlescape $uhost]', '[mysqlescape $text]')"
mysqlexec $mysql_handler $sql
mysqlclose $mysql_handler
}
}
Thank you very much.