#################
proc pub_!tea {nick uhost hand chan rest} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == "help"} {
putnot $nick "!tea will give you a hot tea."
putnot $nick "!tea <nick> will give <nick> a hot tea." ; return 0}
if {$cmd == ""} {
putchan $chan "\001ACTION sets a fresh cup of hot tea in front of $nick\001" ;return 0}
putchan $chan "\001ACTION sets a fresh cup of hot tea in front of $cmd\001"
}
bind pub - !tea pub_!tea
#################
when using "!tea help" it don't work unless 'help' is typed in lowercase letters.. im sure it is "[string tolower [lindex $rest 0]]" causing it but I can't figure out anything else to use to allow caps and lowercase...
Can someone please point me in right direction or show me another example script? Thanks
Last edited by cache on Sat Jul 07, 2007 6:23 pm, edited 1 time in total.