i have a channel on quakenet where everyone gets op.
now i want the bot to remove bans that are set by ops who dont have the
friendly flag +f.
is this possible ?
any help would be much appreciated
Code: Select all
####
# Unban bans set by users without +f on the
# in global or channel user flags
####
# Set below the channels where the bot must unban bans that
# set by users who have not +f in ther flags
set chkchans "#channel1 #channel2 #channel3"
bind mode - * docheckbanright
proc docheckbanright {nick host handle chan modechg vic} {
global chkchans
if {[lsearch -glob [string tolower $chkchans] [string tolower $chan]] > -1} {
if {[strlwr $modechg] == "+b"} {
if {![matchattr $handle f|f $chan]} {
putserv "mode $chan -b $vic"
}
}
}
}
putlog "Unban Bans that setted by non +f users is loaded"
Code: Select all
bind mode - "* +b" rmban:notf
proc rmban:notf {nick uhost hand chan mode vict} {
if {![matchattr $hand f|f $chan] && [botisop $chan]} {
putserv "MODE $chan -b $vict"
}
}It's nice, but then it works on evry channel where the bot is, so, let him/her choice by script in what channel it must do !!!!Sir_Fz:
Code:
bind mode - "* +b" rmban:notf
proc rmban:notf {nick uhost hand chan mode vict} {
if {![matchattr $hand f|f $chan] && [botisop $chan]} {
putserv "MODE $chan -b $vict"
}
}
this should do it. (removes the ban immediatly if the banner is not +f)
just change the bind toTeDDyBeeR wrote:It's nice, but then it works on evry channel where the bot is, so, let him/her choice by script in what channel it must do !!!!Sir_Fz:
Code:
bind mode - "* +b" rmban:notf
proc rmban:notf {nick uhost hand chan mode vict} {
if {![matchattr $hand f|f $chan] && [botisop $chan]} {
putserv "MODE $chan -b $vict"
}
}
this should do it. (removes the ban immediatly if the banner is not +f)
Code: Select all
bind mode - "#channel * +b" rmban:notf
You are right :0GodOfSuicide wrote:just change the bind toTeDDyBeeR wrote:It's nice, but then it works on evry channel where the bot is, so, let him/her choice by script in what channel it must do !!!!Sir_Fz:
Code:
bind mode - "* +b" rmban:notf
proc rmban:notf {nick uhost hand chan mode vict} {
if {![matchattr $hand f|f $chan] && [botisop $chan]} {
putserv "MODE $chan -b $vict"
}
}
this should do it. (removes the ban immediatly if the banner is not +f)and it works just on #channelCode: Select all
bind mode - "#channel * +b" rmban:notf