Bot adding -ao+d flag for a user if he kicks bot or a Protected flag nick.
I want to remove this function from code.
And also
Bot put modes like
** eggdrop sets mode(s) -o flagkicker
** eggdrop sets mode(s) +b *!*flagkicker@*.domain
I need like this
** eggdrop sets mode(s) -o+b flagkicker *!*flagkicker@*.domain
Really appreciated if someone can help me with this...
Thanks in advance
Code: Select all
#
#Protected Flag
set jaDuflag "P"; #
# #
# Ban Time for DeOping
set deoptime "15"; #
# #
# Ban time for kicking
set kicktime "20"; #
# #
# Ban time For Banning
set banstime "60"; #
# #
# Flag for exceptions other than m|m and bot ?� (A-Z or userflag) #
set exceflag "E"; #
# #
# Msg user informing him how to get his ops back (0/1) ?� #
set msgeuser "1"; #
# #
# If you want to log every thing jaDuX #
# does uncomment the this line out. (recommend) #
# #
#logfile 7 * "/path/to/log/jaDuX.log"; #
# #
######################### END OF SYSTEM SETTINGS ##################
######### BINDS ##############
bind mode - *-o* jaDuX:deop
bind kick - * jaDuX:kick
bind mode - *+b* jaDuX:ban
bind chon - * jaDuX:console
######### BINDS ##############
### Set jaDu sys console #####
proc jaDuX:console { hand idx } {
set chan [lindex [console $idx] 0]
if {[matchattr $hand m|m]} { console $idx +1 }
return 0
}
#### End of set console ######
######### jaDu deop ##########
proc jaDuX:deop {nick host hand chan mdechg dnick} {
global botnick jaDuflag exceflag deoptime msgeuser
if {([matchattr $hand m|m $chan]) || ([matchattr $hand $exceflag|$exceflag]) || ([matchattr $hand b])} {return 0}
if {[string tolower $nick] == [string tolower $botnick]} {return 0}
if {[string tolower $dnick] == [string tolower $botnick]} {
if {[validuser $hand]} {
if {[matchattr $hand |o $chan]} {
putserv "PRIVMSG $nick :You have lost your op on $chan for that !!"
chattr $hand |-ao+d $chan
if {$msgeuser} {putserv "PRIVMSG $nick :If you want your op back please talk to one of my masters. Masters on channel $chan are now: [chanlist $chan m|m]"}
if {![string match "$deoptime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Deoped me !! [ctime [unixtime]] - $deoptime min ban." $deoptime}
putloglev 7 * "Protectison system: $nick!$host !$hand! deoped me on $chan !!"
return 0
} else {
chattr $hand |-ao+d $chan
if {![string match "$deoptime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Deoped me !! [ctime [unixtime]] - $deoptime min ban." $deoptime}
putloglev 7 * "Protectison system: $nick!$host !$hand! deoped me on $chan !!"
return 0
}
}
if {![string match "$deoptime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Deoped me !! [ctime [unixtime]] - $deoptime min ban." $deoptime}
putloglev 7 * "Protectison system: $nick!$host !$hand! deoped me on $chan !!"
return 0
}
if {![matchattr [nick2hand $dnick $chan] $jaDuflag|$jaDuflag $chan]} {return 0}
if {[string tolower $dnick] == [string tolower $nick]} {return 0}
if {[botisop $chan]} {
pushmode $chan -o $nick
pushmode $chan +o $dnick
if {![string match "$deoptime" "0"]} {pushmode $chan +b [maskhost $host]}
flushmode $chan
if {[matchattr $hand |o $chan]} {
chattr $hand |-ao+d $chan
putserv "KICK $chan $nick :Do NOT deop $dnick !! - You have lost your op on $chan for that !!"
if {$msgeuser} {putserv "PRIVMSG $nick :If you want your op back please talk to one of my masters. Masters on channel $chan are now: [chanlist $chan m|m]"}
} else {
if {[validuser $hand]} {
chattr $hand |-ao+d $chan
}
putserv "KICK $chan $nick :Do NOT deop $dnick !! - $deoptime min shitlist."
if {![string match "$deoptime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Deoped [nick2hand $dnick $chan] [ctime [unixtime]] - $deoptime min ban." $deoptime}
}
}
putloglev 7 * "Protectison system: $nick!$host !$hand! deoped $dnick![getchanhost $dnick $chan] ![nick2hand $dnick $chan]! on channel $chan !!"
return 0
}
######### End proc deop ####
######### jaDu kick ##########
proc jaDuX:kick {nick host hand chan knick reason} {
global botnick jaDuflag exceflag kicktime msgeuser
if {([matchattr $hand m|m $chan]) || ([matchattr $hand $exceflag|$exceflag]) || ([matchattr $hand b])} {return 0}
if {[string tolower $nick] == [string tolower $botnick]} {return 0}
if {[string tolower $botnick] == [string tolower $knick]} {
if {[validuser $hand]} {
if {[matchattr $hand |o $chan]} {putserv "PRIVMSG $nick :You have lost your op on $chan for that !!"}
chattr $hand |-ao+d $chan
if {$msgeuser} {putserv "PRIVMSG $nick :If you want your op back please talk to one of my masters. Masters on channel $chan are now: [chanlist $chan m|m]"}
if {![string match "$kicktime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Kicked [nick2hand $knick $chan] [ctime [unixtime]] - $kicktime min ban." $kicktime}
putloglev 7 * "Protectison system: $nick!$host !$hand! kicked me off $chan reason: $reason"
return 0
} else {
chattr $hand |-ao+d $chan
if {![string match "$kicktime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Kicked me !! [nick2hand $knick $chan] [ctime [unixtime]] - $kicktime min ban." $kicktime}
putloglev 7 * "Protectison system: $nick!$host !$hand! kicked me off $chan reason: $reason"
return 0
}
if {![string match "$kicktime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Kicked me !! [ctime [unixtime]] - $kicktime min ban." $kicktime}
putloglev 7 * "Protectison system: $nick!$host !$hand! kicked me off $chan reason: $reason"
return 0
}
if {![matchattr [nick2hand $knick $chan] $jaDuflag|$jaDuflag $chan]} {return 0}
if {[string tolower $knick] == [string tolower $nick]} {return 0}
if {[botisop $chan]} {
pushmode $chan -o $nick
if {![string match "$kicktime" "0"]} {pushmode $chan +b [maskhost $host]}
flushmode $chan
if {[matchattr $hand |o $chan]} {
chattr $hand |-ao+d $chan
putserv "KICK $chan $nick :Do NOT Kick $knick !! - You have lost your op on $chan for that !!"
if {$msgeuser} {putserv "PRIVMSG $nick :If you want your op back please talk to one of my masters. Masters on channel $chan are now: [chanlist $chan m|m]"}
} else {
if {[validuser $hand]} {
chattr $hand |-ao+d $chan
}
putserv "KICK $chan $nick :Do NOT Kick $knick !! - $kicktime min shitlist."
if {![string match "$kicktime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Kicked [nick2hand $knick $chan] [ctime [unixtime]] - $kicktime min ban." $kicktime}
}
}
putloglev 7 * "Protectison system: $nick!$host !$hand! kicked $knick![getchanhost $knick $chan] ![nick2hand $knick $chan]! off channel $chan reason: $reason"
}
######### End proc kick ####
######### jaDu ban ##########
proc jaDuX:ban {nick host hand chan mdechg ban} {
global botnick botname jaDuflag exceflag banstime msgeuser
if {([matchattr $hand m|m $chan]) || ([matchattr $hand $exceflag|$exceflag]) || ([matchattr $hand b])} {return 0}
if {[string tolower $nick] == [string tolower $botnick]} {return 0}
if {[string match "$ban" "$botname"]} {
pushmode $chan -o $nick
putserv "MODE $chan -b $ban"
if {![string match "$banstime" "0"]} {pushmode $chan +b [maskhost $host]}
flushmode $chan
if {[matchattr $hand |o $chan]} {
chattr $hand |-ao+d $chan
putserv "KICK $chan $nick :Do NOT ban me !! - You have lost your op on $chan for that !!"
if {$msgeuser} {putserv "PRIVMSG $nick :If you want your op back please talk to one of my masters. Masters on channel $chan are now: [chanlist $chan m|m]"}
} else {
if {[validuser $hand]} {chattr $hand |-ao+d $chan}
putserv "KICK $chan $nick :Do NOT ban me !! - $banstime min shitlist."
if {![string match "$banstime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Banned me [ctime [unixtime]] - $banstime min ban." $banstime}
}
putloglev 7 * "Protectison system: $nick!$host !$hand! banned me on $chan !!"
}
set pnicks [chanlist $chan $jaDuflag|$jaDuflag]
foreach pnick $pnicks {
if {[string match "$ban" "$pnick![getchanhost $pnick $chan]"]} {
pushmode $chan -o $nick
pushmode $chan -b $ban
if {![string match "$banstime" "0"]} {pushmode $chan +b [maskhost $host]}
flushmode $chan
if {[matchattr $hand |o $chan]} {
chattr $hand |-ao+d $chan
putserv "KICK $chan $nick :Do NOT ban $pnick !! - You have lost your op on $chan for that !!"
if {$msgeuser} {putserv "PRIVMSG $nick :If you want your op back please talk to one of my masters. Masters on channel $chan are now: [chanlist $chan m|m]"}
} else {
if {[validuser $hand]} {chattr $hand |-ao+d $chan}
putserv "KICK $chan $nick :Do NOT ban $pnick !! - $banstime min shitlist."
if {![string match "$banstime" "0"]} {newchanban $chan [maskhost $host] jaDuX "Banned [nick2hand $pnick $chan] [ctime [unixtime]] - $banstime min ban." $banstime}
}
putloglev 7 * "Protectison system: $nick!$host !$hand! banned $pnick![getchanhost $pnick $chan] ![nick2hand $pnick $chan]!on channel $chan !!"
}
}
}
######### End proc ban ####