# Process the version reply for mirc	
proc reply:version_check { nick host hand dest keyword text } {
	global ch_pass botnick

	set reply [string tolower $text]
	if { [string match "*mirc*" "$reply"] } {
		putserv "PRIVMSG $nick :Channel Password $ch_pass"
		putserv "PRIVMSG $nick : Type /msg $botnick password <channel password> (In 2 minute you will be ban, if you don't reply)"
		utimer 120 [list pass_ck $nick $host $hand &text]
	}
}

#process the Password reply
bind msg - password pass_ck
proc pass_ck { nick host hand text } { 
	global channel ch_pass
	if { $text == "$ch_pass"} {  
		if {[utimerexists pass_ck]!=""} { killutimer [pass_ck] }
		putserv "PRIVMSG $nick :Password accepted"
		putlog "$nick Password accepted" } {
		# Commence with the kickban
		putlog "$nick did not reply or pass was wrong"
		putserv "PRIVMSG $nick :Wrong password or no reply"
		putquick "MODE $channel +b [maskhost $host]"
		putquick "KICK $channel $nick :Scripts are not welcome here."