Code: Select all
set extras {
"coke"
"orange"
"lime"
...
}
Code: Select all
proc vodka {nick host handle chan text} {
global extras
# Go through the whole list
foreach extra $extras {
# See if it's mentioned anywhere
if {[string match "*$extra*" $text]} {
puthelp "PRIVMSG $chan :[1code]
proc vodka {nick host handle chan text} {
global extras
# Go through the whole list
foreach extra $extras {
# See if it's mentioned anywhere
if {[string match "*$extra*" $text]} {
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka and $extra 01"
return 0
}
}
# If we made it this far, none of the extras were mentioned
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka01"
return 0
}
[/code1]01ACTION gives $nick a glass of vodka and $extra [1code]
proc vodka {nick host handle chan text} {
global extras
# Go through the whole list
foreach extra $extras {
# See if it's mentioned anywhere
if {[string match "*$extra*" $text]} {
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka and $extra 01"
return 0
}
}
# If we made it this far, none of the extras were mentioned
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka01"
return 0
}
[/code1]01"
return 0
}
}
# If we made it this far, none of the extras were mentioned
puthelp "PRIVMSG $chan :[1code]
proc vodka {nick host handle chan text} {
global extras
# Go through the whole list
foreach extra $extras {
# See if it's mentioned anywhere
if {[string match "*$extra*" $text]} {
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka and $extra 01"
return 0
}
}
# If we made it this far, none of the extras were mentioned
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka01"
return 0
}
[/code1]01ACTION gives $nick a glass of vodka[1code]
proc vodka {nick host handle chan text} {
global extras
# Go through the whole list
foreach extra $extras {
# See if it's mentioned anywhere
if {[string match "*$extra*" $text]} {
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka and $extra 01"
return 0
}
}
# If we made it this far, none of the extras were mentioned
puthelp "PRIVMSG $chan :01ACTION gives $nick a glass of vodka01"
return 0
}
[/code1]01"
return 0
}