;EBP
;Author: RoberT
;Created: this year
on *:LOAD: {
set %ebp_s disabled
set %ebp_kmsg Ban Attempt Prevented! You need to try abit harder ;)
set %ebp_pu ebp_pud
echo -a Easy Ban Protection (EBP) was successfully loaded...
echo -a Thank You for downloading and hopefully using EBP
echo -a Enjoy!
}
alias ebp { dialog -m ebp ebp }
dialog ebp {
title "Easy Ban Protection"
size -1 -1 102 101
option dbu
check "Enable", 1, 3 3 28 10
box "Kick Message:", 2, 3 43 97 26
edit "", 3, 9 52 84 11, autohs
box "Punishment:", 5, 3 17 97 24
radio "Deop", 6, 8 26 24 10
radio "Kick", 7, 37 26 21 10
radio "Ban/Kick", 8, 64 26 32 10
button "Clear Kick Message", 9, 3 76 96 11
button "Done", 4, 3 87 96 11, ok
}
on *:DIALOG:ebp:init:*: {
did -a ebp 3 %ebp_kmsg
if (%ebp_pu == ebp_pud) { did -c ebp 6 }
elseif (%ebp_pu == ebp_puk) { did -c ebp 7 }
elseif (%ebp_pu == ebp_pukb) { did -c ebp 8 }
if (%ebp_s == enabled) { did -c ebp 1 | did -e ebp 3,6,7,8,9 }
if (%ebp_s == disabled) { did -b ebp 3,6,7,8,9 }
}
on *:DIALOG:ebp:sclick:*: {
if ($did == 1) { if ($did(ebp,$did).state == 1) { did -e ebp 3,6,7,8,9 | set %ebp_s enabled | .enable #ebp } | else { did -b ebp 3,6,7,8,9 | set %ebp_s disabled | .disable #ebp } }
if ($did == 6) { set %ebp_pu ebp_pud }
if ($did == 7) { set %ebp_pu ebp_puk }
if ($did == 8) { set %ebp_pu ebp_pukb }
if ($did == 9) { did -r ebp 3 | set %ebp_kmsg }
}
on *:DIALOG:ebp:edit:3: { set %ebp_kmsg $did(ebp,3) }
#ebp on
on *:BAN:#: {
if (%ebp_s == enabled) {
if ($me == $nick) { return }
if ($me isop $chan) && (%ebp_pu == ebp_pud) && ($banmask iswm $address($me,5)) { mode $chan -b $banmask | mode $chan -o $nick | msg $nick %ebp_kmsg }
if ($me isop $chan) && (%ebp_pu == ebp_puk) && ($banmask iswm $address($me,5)) { mode $chan -b $banmask | mode $chan -o $nick | kick $chan $nick %ebp_kmsg }
if ($me isop $chan) && (%ebp_pu == ebp_pukb) && ($banmask iswm $address($me,5)) { mode $chan -o $nick | mode $chan -b $banmask | ban $chan $nick | kick $chan $nick %ebp_kmsg }
}
if ($me isreg $chan) { echo -a [Easy Ban Protection] Was unable to prevent you from getting banned in $chan | echo -a [Easy Ban Protection] Reason: You need OP (@) | halt }
if ($me isvoice $chan ) { echo -a [Easy Ban Protection] Was unable to prevent you from getting banned in $chan | echo -a [Easy Ban Protection] Reason: You need OP (@) | halt }
else { halt }
}
#ebp end
Menu channel,status,menubar {
Easy Ban Protection
.Dialog { ebp }
.Unload { unset %ebp_* | echo -a Easy Ban Protection Was UnLoaded Successfully! | echo -a In order to improve this addon further, please email me back feedbacks (ole@team-future.com).. | unload -rs EBP.mrc }