There are not enough arguments here, to accept all information sent. I can allmost gurentee the message you get here isproc help {nick host handle text} {
See tcl-commans.doc, for the required amount of arguments and there meaning, for the PUB and other type binds.Called "help" with too many arguments
Code: Select all
proc scriptname:purpose {args} {
body
}
Code: Select all
###################################
# Ai.tcl by KuNgFo0 (#eggfaq@efnet)
#VERSION 0.3
#DESCRIPTION Responds to certain words said in the set channels.
# Set the next lines as the triggers and random responses you want
# (wildcards may be used)
set ai_data {
{"*trigger #1A*" "*trigger #1B*"} {
"trigger #1 response #1"
"trigger #1 response #2"
}
{"*trigger #2A*" "*trigger #2B*"} {
"trigger #2 response #1"
"trigger #2 response #2"
}
{"Hello" "Hi" "Hey"} {
"Hey what's up, $nick?"
"Yo"
"Hello!"
}
{"What time is it?" "What is the time?" "What's the time?" "Anyone have the time?"} {
"$nick, it's [clock format [clock seconds]]"
}
}
# Set the next line as the channels you want to run in
set ai_chans "#testchannel1 #testchannel2"
proc pub_ai {nick uhost hand chan arg} {
global ai_data ai_chans botnick
if {(([lsearch -exact [string tolower $ai_chans] [string tolower $chan]] != -1) || ($ai_chans == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
foreach {triggers responses} $ai_data {
foreach trigger $triggers {
if {[string match [string tolower $trigger] [string tolower $arg]]} { putserv "PRIVMSG $chan :[subst [lindex $responses [rand [llength $responses]]]]" ; return }
}
}
}
}
bind pubm - * pub_ai
putlog "*** Ai.tcl 0.3 by KuNgFo0 loaded"