TCL Ops everyone in a channel on join

Ops everyone in a channel on join

# Ops everyone in a channel on join
# blank "avchan" is for all channels

set avchan "#o"

bind join - * avjoin

proc avjoin {nick uhost hand chan} {
	global avchan botnick
	if {$nick == $botnick} {return 0}
	if {$avchan == "" && [botisop $chan]} {
  		pushmode $chan +o $nick
  		return 0
	}
	set chan [string tolower $chan]
	foreach i [string tolower $avchan] {
		if {$i == $chan && [botisop $chan]} {
			pushmode $chan +o $nick
			return 0
		}
	}
}
putlog "Loaded Ops All"