BAn Locker

By Johnny92 on Aug 18, 2008

The will make sure no one takes off those bans you want to keep on, not even owners can take it off.

on me:*:ban:#: {
  if ($banmask !iswm $ial($me)) {
    writeini -n bans.ini $chan $banmask 1
  }
}
on me:*:unban:#: {
  if ($readini(bans.ini,$chan,$banmask)) {
    .remini bans.ini $chan $banmask
  }
}
on !*:Unban:#: {
  if ($readini(bans.ini,$chan,$banmask)) && ($nick($chan,$me,oh)) {
    mode $chan +b $banmask
  }
}
on me:*:join:#: {
  mode $chan +b
  .timer 1 2 banlock_build $chan
}
alias banlock_build {
  var %x = 1, %y = $ibl($1,0)
  while (%x <= %y) {
    if ($ibl($1,%x).by == $me) writeini -n bans.ini $1 $+($1,.,$ibl($1,%x)) 1
    inc %x
  }
}
raw 367:*: halt
raw 368:*: halt

; ===========================================================
; For you who like a menu; here you go!
; ===========================================================

#banlock on
on me:*:ban:#: {
  if ($banmask !iswm $ial($me)) {
    writeini -n bans.ini $chan $banmask 1
  }
}
on me:*:unban:#: {
  if ($readini(bans.ini,$chan,$banmask)) {
    .remini bans.ini $chan $banmask
  }
}
on !*:Unban:#: {
  if ($readini(bans.ini,$chan,$banmask)) && ($nick($chan,$me,oh)) {
    mode $chan +b $banmask
  }
}
#Banlock end
#banlock_jcheck on
on me:*:join:#: {
  mode $chan +b
  .timer 1 2 banlock_build $chan
}
alias banlock_build {
  var %x = 1, %y = $ibl($1,0)
  while (%x <= %y) {
    if ($ibl($1,%x).by == $me) writeini -n bans.ini $1 $+($1,.,$ibl($1,%x)) 1
    inc %x
  }
}
raw 367:*: halt
raw 368:*: halt
#banlock_jcheck end
Menu * {
  .Ban Lock 
  ..Turn banlock $iif($group(#Banlock) == on,Off,On) : $iif($group(#Banlock) == on,disable,enable) #banlock 
  ..-
  ..$iif($group(#banlock_jcheck) == on,Disable,Enable) Banlock join update: $iif($group(#banlock_jcheck) == on,.Disable,.Enable) #banlock_jcheck
}

; ===================================================
; Yoinxs version
; ===================================================

on me:*:join:#: {
  mode $chan +b
  .timer 1 2 banlock_build $chan
}
alias banlock_build {
  var %x = 1
  while (%x <= $ibl($1,0)) {
    if ($ibl($1,%x).by == $me) hadd -m banlock $+($1,.,$ibl($1,%x))
    inc %x
  }
}
on me:*:ban:#: {
  hadd -m banlock $+($chan,.,$banmask)
}
on me:*:unban:#: {
  hdel -w banlock $+($chan,.,$banmask)
}
on !*:unban:#: {
  if ($hfind(banlock,$+($chan,.,$banmask),w,1)) || ($hfind(banlock,$+($chan,.,$banmask),W,1)) {
    if ($me isop $chan) || ($me ishop $chan) mode $chan +b $banmask
  }
}
raw 367:*: halt
raw 368:*: halt

Comments

Sign in to comment.
unseen   -  Jun 30, 2009

even though this script is almost a year old... but in some cases it might lead to an excess flood quit.. especially if there was many bans, and they got cleared all in a time by cs or someone.. like -bbbbbb !@ip1 !@ip2 !@ip3 !@ip4 !@ip5 !@ip6
the script will set them back 1 by 1.
+b !@ip1
+b !@ip2
etc..
how to fix this part of it, to reset all bans together (+bbbbbb !@ip1 !@ip2 !@ip3 !@ip4 !@ip5 !@ip6)

i've noticed something else.. when my nick is deopped and the ban is removed, and then opped my self, i need to re-set the ban because it wont do it after the deop..

it would be more than perfect if this small part was fixed..

thanks

 Respond  
Eugenio   -  Aug 30, 2008

ROFL

 Respond  
napa182   -  Aug 30, 2008

@ Abtehi ffs there is a damn edit button upper right use it ffs

 Respond  
Abtehi   -  Aug 30, 2008

this snippet is similar to sh7tlisted & blacklisted thing...... remember that... they will be removed & rebanned again, just like cheiron just mentioned.

please disregard last 2 comments, my languages were censored & blocked.

 Respond  
Abtehi   -  Aug 30, 2008

this snippet is similar to sh7t & banlist..... remember that... they will be removed & rebanned again, just like cheiron just mentioned.

 Respond  
Abtehi   -  Aug 30, 2008

this snippet is similar to shitlist & banlist..... remember that... they will be removed & rebanned again, just like cheiron just mentioned.

 Respond  
Spanky   -  Aug 21, 2008

also /cs clear bans or w.e gets around it :P /me rates 6/10

 Respond  
Johnny92   -  Aug 19, 2008

okay thanks, and yes it is a good movie, just saw it in the movies the other day,

 Respond  
LucSatise   -  Aug 19, 2008

also if an owner really wanted it removed he wuld just destatus u and invite the person back in.

5/10 also

 Respond  
Cheiron   -  Aug 18, 2008

ok.. i had another look now i finally finsihed watching Dark Knight,,, (good film btw)

yeah i see the add ban onban there. still a way around it though unless you have the owner access in channel

e nick!user@host
Exception ban – If someone matches this, they can join a channel even if they match an existing ban

nice script though and i gonna kick it off with a 5 rating

 Respond  
Johnny92   -  Aug 18, 2008

lol okay

 Respond  
Cheiron   -  Aug 18, 2008

hold the phone.... he's having a re-read... bear with me

 Respond  
Johnny92   -  Aug 18, 2008

No just when soemoen Tries to take it off it auto goes back on even if they arnt in the chan

 Respond  
Cheiron   -  Aug 18, 2008

err yes an owner can. owner has total channel control.. what you have there though is a storage of the nicks.. so if they are removed.. the next time they come back in channel, your snippet will get them again,applying the ban again

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.