#  Tcl error [pub_@smoke]: wrong # args: should be "chanchecker chan"


proc chanchecker {chan} {if{![string match "*+jokes*" [channel info $chan]]} {return 0}}

proc pub_@smoke {nick uhost hand chan rest} {
  global botnick
  chanchecker
  set cmd [string tolower [lindex $rest 0]]
    if {$cmd == "help"} {
        putnot $nick "Smoke a Bowl?"
        putnot $nick "Share, smoke a bowl with <nick>"
        return 0
    }
    if { $cmd == "imbotok" } {
        set num [rand 4]
	if {$num == "0"} {
            putchan $chan "\001ACTION \002\00315 im already fuckin high"
            return 0
        } elseif {$num == "1"} {
            putchan $chan "\001ACTION \002\00315 Fuck that i wanna shotgun !"
            return 0
        } elseif {$num == "2"} {
            putchan $chan "\001ACTION \002\00315 $nick, no more.. pleeeaase !"
            return 0
        } elseif {$num == "3"} {
            putchan $chan "\001ACTION \002\00315 Damn finally.."
            return 0
        }
    } elseif {$cmd == ""} {
        putchan $chan "\001ACTION \002\00315 $nick sits down and sparks up a bowl"
        return 0
    }
    putchan $chan "\001ACTION \00315$nick hands the pipe to $rest"
}
bind pub - !smoke pub_@smoke