Code: Select all
bind join - * check
proc check {nick host hand chan} {
bind mode - "% +o" deop
}
proc deop {nick host hand chan mode victim} {
if {[string equal -nocase "ChanServ" $nick] && ![validuser [nick2hand $victim $chan]]} {
pushmode -o $chan $victim
}
unbind mode - "% +o" deop
}
Thanks in advance sirset oplist(ops) {
"nick1"
"nick2"
"nick3"
"andsoon"
}
bind - * on join
bind -* on nickchange
#if nick is not on the list of oplist(ops) bot will deop/ban the nick
#if the nick change and not on the oplist(ops) the bot will deop/ban the nick
Code: Select all
set oplist {
""
""
""
""
}
bind join - * check
bind nick - * isop
proc check {nick host hand chan} {
if {![info exists deop]} {
bind mode - "% +o" deop
}
}
proc isop {nick host hand chan newnick} {
if {![info exists deop]} {
bind mode - "% +o" deop
}
}
proc deop {nick host hand chan mode victim} {
set host [getchanhost $victim $chan]
set mask [lindex [split $host @] 1]
set host "*!*@*.[join [lrange [split $mask .] 2 end] .]"
foreach o $oplist {
if {![string equal -nocase [join $o] $victim]} {
putquick "MODE $chan -o+b $victim $host"
putserv "KICK $chan $victim :You are not permitted to have ops on this channel."
}
}
unbind mode - "% +o" deop
}
Code: Select all
set oplist {
""
""
""
""
}
bind mode - "% +o" deop
proc deop {nick host hand chan mode victim} {
set host [getchanhost $victim $chan]
set mask [lindex [split $host @] 1]
set host "*!*@*.[join [lrange [split $mask .] 2 end] .]"
foreach o $oplist {
if {![string equal -nocase [join $o] $victim]} {
putquick "MODE $chan -o+b $victim $host"
putserv "KICK $chan $victim :You are not permitted to have ops on this channel."
}
}
}