Yes im new to tcl script but i would like to learn it, but im not sure what is wrong with this script... if anyone can tell me that would be great
( Jokes cut down to 2 jokes from the whole list in order to make script shorter )
Code: Select all
# !Jokes
bind pub - !jokes pub_jokes
bind pub - "!joke" pub:redneck
bind pub - "!joke" pub:annoy
bind pub - "!joke" pub:blonde
bind pub - "!joke" pub:computers
bind pub - "!joke" pub:condoms
bind pub - "!joke" pub:elevator
bind pub - "!joke" pub:misc
bind pub - "!joke" pub:thoughts
bind pub - "!joke" pub:yomama
proc pub_jokes {nick uhost hand chan text} {
putserv "NOTICE $nick : 4\[7»»4\] Joke Commands 4\[7««4\]"
putserv "NOTICE $nick : 4!joke 7Random Joke"
putserv "NOTICE $nick : 4!joke annoy 7 101 Ways To Annoy Someone"
putserv "NOTICE $nick : 4!joke blonde 7 Blonde Jokes"
putserv "NOTICE $nick : 4!joke computers 7 Computer Jokes"
putserv "NOTICE $nick : 4!joke elevator 7 52 Fun Things To Do In An Elevator"
putserv "NOTICE $nick : 4!joke condoms 7 Condom Jokes"
putserv "NOTICE $nick : 4!joke misc 7 Misc Jokes"
putserv "NOTICE $nick : 4!joke redneck 7 Redneck Jokes"
putserv "NOTICE $nick : 4!joke thoughts 7 Whats On Your Mind"
putserv "NOTICE $nick : 4!joke yomama 7 Yo Mama Jokes"
}
set redneckjokes {
"More than one living relative is named after a Southern Civil War general"
"You think the stock market has a fence around it"
}
proc pub:redneck { nick uhost handle channel text } {
global redneckjokes
if {$text == "redneck"} {
set respond [lindex $redneckjokes [rand [llength $redneckjokes]]]
putserv "PRIVMSG $channel :\002$nick\002 You Might Be A Redneck If: $respond"
}
}
set annoyjokes {
"Get to know a friends bookie and place bets for them. Insist on keeping half of any money they win."
"Accuse people of \"glue sniffing addictions\" in public."
}
proc pub:annoy { nick uhost handle channel text } {
global annoyjokes
if {$text == "annoy"} {
set respond [lindex $annoyjokes [rand [llength $annoyjokes]]]
putserv "PRIVMSG $channel :101 Ways To Annoy People: $respond"
}
}
set blonejokes {
"Q: How do blonde brain cells die ? A: Alone."
"Q: How do you change a blonde's mind? A: Blow in her ear."
}
proc pub:blone { nick uhost handle channel text } {
global blonejokes
if {$text == "blone"} {
set respond [lindex $blonejokes [rand [llength $blonejokes]]]
putserv "PRIVMSG $channel :$respond"
}
}
set computersjokes {
"Your stationery is more cluttered than Warren Beatty's address book. The letterhead lists a fax number, e-mail addresses for two on-line services, and your Internet address, which spreads across the breadth of the letterhead and continues to the back. In essence, you have conceded that the first page of any letter you write *is*letterhead"
"You have never sat through an entire movie without having at least one device on your body beep or buzz"
}
proc pub:computers { nick uhost handle channel text } {
global computersjokes
if {$text == "computers"} {
set respond [lindex $computersjokes [rand [llength $computersjokes]]]
putserv "PRIVMSG $channel :You Know Your a Computer Addict When: $respond"
}
}
set condomsjokes {
"Nike Condoms: Just do it."
"Toyota Condoms: Oh what a feeling."
}
proc pub:condoms { nick uhost handle channel text } {
global condomsjokes
if {$text == "condoms"} {
set respond [lindex $condomsjokes [rand [llength $condomsjokes]]]
putserv "PRIVMSG $channel : $respond"
}
}
set elevatorjokes {
"#1: Make race car noises when anyone gets on or off."
"#2: Blow your nose and offer to show the contents of your kleenex to other passengers."
}
proc pub:elevator { nick uhost handle channel text } {
global elevatorjokes
if {$text == "elevator"} {
set respond [lindex $elevatorjokes [rand [llength $elevatorjokes]]]
putserv "PRIVMSG $channel :52 Fun Things To Do In An Elevator $respond"
}
}
set miscjokes {
"How come wrong numbers are never busy?"
"Do people in Australia call the rest of the world \"up over\"?"
}
proc pub:misc { nick uhost handle channel text } {
global miscjokes
if {$text == "misc"} {
set respond [lindex $miscjokes [rand [llength $miscjokes]]]
putserv "PRIVMSG $channel :$respond"
}
}
set thoughtsjokes {
"Hackers: We're explorers, not criminals"
"In the realm of the blind, the one-eyed man is king"
}
proc pub:thoughts { nick uhost handle channel text } {
global thoughtsjokes
if {$text == "thoughts"} {
set respond [lindex $thoughtsjokes [rand [llength $thoughtsjokes]]]
putserv "PRIVMSG $channel :$respond"
}
}
set yomamajokes {
"Fat, That when the casier at KFC asked her what size bucket of chicken she wanted, she said the one on the roof"
"Fat, That she has more rolls than the bakery"
}
proc pub:yomama { nick uhost handle channel text } {
global yomamajokes
if {$text == "yomama"} {
set respond [lindex $yomamajokes [rand [llength $yomamajokes]]]
putserv "PRIVMSG $channel :\002$nick\002 Yo Mama So $respond"
}
}
putlog "* Jokes Loaded."