i know the manual is there but i find i learn better by example
Code: Select all
proc servebeer {nick uhost hand chan rest} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == "orac"} {
putserv "PRIVMSG $chan :\00310thanks $nick, but i don't drink alcohol\003" ;return 0}
if {$cmd == "bruhv"} {
putserv "PRIVMSG $chan :\001ACTION \00310draws a pint of the finest english ale for $cmd\003\001" ;return 0}
if {$cmd == ""} {
putserv "PRIVMSG $chan :\001ACTION \00310pours a jug of warm beer and slides it over to $nick\003\001" ;return 0}
putserv "PRIVMSG $chan :\001ACTION \00310pours a jug of warm beer and slides it over to $rest\003\001"
}
bind pub - !beer servebeerthanks in advance