Hi! I need tcl whats do this:
if some1 say to the channel !url game then the bot say #chan www.games.com and if some1 say !url apps then http://www.apps.com/
thanx 4 all
Code: Select all
bind pub - !url my:url
proc my:url {nick uhost hand chan text} {
switch -- [string tolower [lindex $text 0]] {
"game" {
putserv "PRIVMSG $chan :The game url is: www.gameurl.com"
return
}
"apps" {
putserv "PRIVMSG $chan :The apps url is: www.appsurl.com"
return
}
default {
putserv "PRIVMSG $chan :USAGE: !url game or !url apps"
}
}
}