bind pub o|g .join join1:pub
proc join1:pub {nick uhost hand chan text} {
 set newchan [lindex $text 0]
 if {![validchan $newchan]} {
  channel add $newchan
  save
 } else {
  return 0
 }
}