bind pub -|gv !register pub:register

proc pub:register {nick uhost hand chan txt} {
	global reg
	
	set reg(chan) [lindex $txt 0]
	set reg(who)  [lindex $txt 1]
	set reg(x)    "$nick $hand $chan pub"
	set reg(mix)  [split $uhost]
	
	putallbots "freechans"

	bind bot B chansfree bot:chansfree

}


proc bot:chansfree {bot com txt} {
	global reg

	unbind bot B chansfree bot:chansfree

	putbot $bot "addchan $reg(chan) $reg(who) $reg(x) $reg(mix)"
}

putlog "\00304 Request loaded"