< Eggdrop
# oh lord, this is getting really recursive. # doofy bot for eggdrop # originally by Robey <robey@lightning.net> # modified by Partek <partek@indecent.com> # modified by Pinchaser <tablan@ufem.com> # modified by Eden <eden@queer.org.au> # Answers questions of the form "8ball, tell me something" either said on the # channel, or in a private msg to the bot. # <user@bot> 8ball # response: .note user@bot <response> set response { "Zasigurno!" "Pitaj nekog drugog." "Mozda,u nekoj drugoj prici." "Ne." "To pitanje trebas pitati samog sebe." "Moglo bi biti nesto od toga." "Volio bih kad bi bilo tak." "Ni u kojem slucaju." "Trebas biti poremecen da pitas tako nesto." "Mozda -- daj mi vise love i pitaj ponovo." "Da, da, da i opet da." "To bi ti zelio." "Ne bas." "Zauzet sam." "Koncentriraj se i pitaj ponovo." "Vjerovatno." "Neznam nista o tome." "Nema sanse." "Sve upucuje da da." "Nikad." ":" } bind pubm - "8ball,*" pub_8ball bind pubm - "8ball *" pub_8ball proc pub_8ball {nick chan text uhost args} { global response botnick channel set output8 [lindex $response [rand [llength $response]]] if {[string compare $output8 ":"] == 0} { set outnick [lindex [chanlist] [rand [llength [chanlist]]]] if {[string compare $outnick $botnick] != 0} { putserv "PRIVMSG $chan :$nick, Try asking someone who cares, maybe $outnick does?" } else { putserv "PRIVMSG $chan :$nick, why should I care?" } } else { putserv "PRIVMSG $chan :$nick, $output8" } } bind msg - "8ball," msg_8ball bind msg - "8ball" msg_8ball proc msg_8ball {nick uhost hand args} { global response set output8 [lindex $response [rand [llength $response]]] if {[string compare $output8 ":"] == 0} { putserv "PRIVMSG $nick :$nick, why should I care?" } else { putserv "PRIVMSG $nick :$nick, $output8" } } putlog "8ball module loaded! [llength $response] answers"