bind join - * join:add_to_database
bind rejn - * join:add_to_database
proc join:add_to_database { nick host hand chan } {
    if {[isbotnick $nick] == 1} {
         foreach user [chanlist $chan] {
             puthelp "PRIVMSG $chan :$user"
         }

    }


    sql "INSERT INTO phpbb_livechat (nickname) VALUES ('$nick');"

  return 0
}
