Just A Simple ban protection with dialog
dialog banprot {
title "Ban Protections"
size -1 -1 152 102
option dbu
tab "Ban Protection", 1, 1 1 157 100
radio "ON", 2, 68 40 22 10, tab 1
radio "OFF", 3, 68 52 22 10, tab 1
text "Ban Protection", 4, 31 20 94 8, tab 1 center
button "Done", 9, 59 75 37 12, tab 1 cancel
tab "Undernet Ban Protection", 5
text "Created By G13AoUsTiS", 10, 47 90 63 8, disable tab 1 center
text "Created By G13AoUsTiS", 12, 47 90 63 8, disable tab 5 center
radio "OFF", 6, 70 54 22 10, tab 5
radio "ON", 7, 70 42 22 10, tab 5
text "Undernet Ban Protection", 8, 33 22 94 8, tab 5 center
button "Done", 11, 61 77 37 12, tab 5 ok
}
on *:dialog:banprot:sclick:*: {
if ($did == 2) { /set %bprot ON }
if ($did == 3) { /set %bprot OFF }
if ($did == 7) { /set %uprot ON }
if ($did == 6) { /set %uprot OFF }
}
on *:ban:#: {
if (%bprot == ON) {
if ($banmask iswm $address($me,5) && $nick == $me) { mode $chan -b $banmask }
else if ($banmask iswm $address($me,5)) {
.mode # -ob+b $nick $banmask $address($nick,2)
.kick # $nick Please Do Not Ban Me. Thank You
}
}
}
on *:kick:#:{
if (%uprot == ON) {
if ($nick == x) {
if ($knick == $me) {
msg x ban # $+(*!*@,$remove($remove($1,$chr(40)),$chr(41)),.users.undernet.org) Please Do Not Ban Me. Thank You
msg x unban # $me join #
}
}
}
}
menu channel {
-
Ban Protections: /dialog -m banprot banprot
}