What it does: Script give an op to users who join and are authed and have set mode +x.
Usage: !aop on/off/status
- Code: Select all
setudef flag authop
bind pub n "!aop" pub:aop
bind join - * join:aop
proc pub:aop {nick host hand chan arg} {
if {[lindex $arg 0] == ""} {
putserv "notice $nick :Usage: !aop on|off|status"
} else {
if {[lindex $arg 0] == "status"} {
if {[channel get $chan authop] == "1"} {
putserv "notice $nick :Auto op status is enabled."
} else {
putserv "notice $nick :Auto op status is disabled."
}
} elseif {[lindex $arg 0] == "on"} {
if {[channel get $chan authop] != "1"} {
channel set $chan +authop
putserv "notice $nick :Auto op status has been enabled."
} else {
putserv "notice $nick :Autop op status is already enabled."
}
} elseif {[lindex $arg 0] == "off"} {
if {[channel get $chan authop] != "0"} {
channel set $chan -authop
putserv "notice $nick :Autop op status has been disabled."
} else {
putserv "notice $nick :Auto op status is already disabled."
}
}
}
}
proc join:aop {nick host hand chan} {
if {[string match *.users.quakenet.org* $host]} {
if {[channel get $chan authop] == "1"} {
putserv "mode $chan +o $nick"
}
}
}
Hope this helps.
tHx.!