proc checkchannel {nick uhost handle chan} {
    global mainchan
    if {[lsearch -exact $mainchan $chan] == -1} {
        putserv "PRIVMSG $chan : DENIED"
    } else {
        putserv "PRIVMSG $chan : APPROVED"
    }
}
