bind CTCP - action act:scritches
proc act:scritches {nick mask hand chan arg} {
global scritches
if {[lindex $arg 1] == "scritches"} {
if {[lindex $arg 2] == "Max"} {
putserv "PRIVMSG $chan :\001ACTION [lindex $scritches [rand [llength $scritches]]] at $nick."
}
}
}
set scritches {
"purrs loudly"
"fires up the rumble machine"
"looks up"
"mrrrps"
}
I'm trying to get a cat to respond to actions (and have random responses). The basic one above is responding to "ACTION Brendan scritches Max" (or MaxCat). I'm fairly new to tcl, and this is my second bot. Eventually he'll respond to other things and queue them up for eating, and well, this'll be a complicated bot by the time I get done with it

I'd appreciate any help with this.