Hi guys, I am running eggdrop 1.6.17; I am trying to make my bot respond to comments made in private msg between the bot and user. We are having trouble getting the bot to respond dynamically to user input. Here is a sample of my code; any suggestions would be greatly appreciated.
bind pub - !takethis pub_takethis
bind msg - !question pub_question
proc pub_takethis {nick mask hand channel args} {
set args_list [split $args "."]
set tnick [lindex $args_list 0]
set tcase [lindex $args_list 1]
set tchannel [lindex $args_list 2]
putquick "PRIVMSG #bot_city :$tchannel"
putquick "PRIVMSG $tchannel :!take"
putquick "PRIVMSG #bot_city :!taken $tcase.$tchannel"
putquick "PRIVMSG $tnick :Hello there\! My name is AgentBot. Give me a few moments to open and read over the case notes. I'll be right with you."
}
proc pub_question {nick mask hand channel args} {
putquick "PRIVMSG #bot_city :$nick it Worked!!"
switch {$arg} {
1 putquick { "PRIVMSG $nick :So this is a video issue." }
2 putquick { "PRIVMSG $nick :so this is an audio issue." }
3 putquick { "PRIVMSG $nick :so this is a startup issue." }
default putquick { "PRIVMSG $nick :It could be anything." }
}
}