i am trying to make a script that when i add a chattr nick +y on egg. when the person joins the channel it make a channel flag +a for that user/op/halfop
here is code i have so far seems not to work
setudef flag aprotect
bind join y * a:protect
proc a:protect {nick uhost handle channel} {
global botnick
if {[lsearch -exact [channel info $channel] -freevoice] != -1 || ![botisop $channel]} { return }
pushmode $channel +a $nick
}