/unbanall <#channel>

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

/unbanall <#channel>

Postby Cristian » Sat Dec 01, 2007 1:49 pm

Code: Select all
;# /unbanall #channel
;# Tested and works on version 6.15
alias unbanall {
  if ($me isop $1) {
    var %x = $ibl($1,0)
    while (%x) {
      var %b = $addtok(%b,$ibl($1,%x),32)
      if ($numtok(%b,32) == 6) {
        .mode $1 $str(-b,$numtok(%b,32)) %b | var %b
      }
      dec %x
    }
    if ($numtok(%b,32) > 0) {
      .mode $1 $str(-b,$numtok(%b,32)) %b
    }
  }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: /unbanall <#channel>

Postby vodkaplayer » Sat May 10, 2008 7:43 am

this code is wrong at all.
vodkaplayer
 

Re: /unbanall <#channel>

Postby Dandy » Sat May 10, 2008 7:46 am

Code: Select all
;/unbanall #kanal
alias unbanall {
  .mode $1 +b-b * *
}
works
Dandy
 

Re: /unbanall <#channel>

Postby SilverRain » Thu May 15, 2008 8:16 am

or you could do

Code: Select all
alias unbanall { 
var %x = 1
while (%x <= $ibl($1,0)) {
var %q = $ibl($1,%x)
var %d = $addtok(%d,%q,32)
inc %x
}
var %i = $numtok(%d,32)
while (%i) {
mode $1 - $+ $str(b,6) $gettok(%i,1-6,32)
dec %i
}
echo Cleared all bans for $1
}
SilverRain
 

Re: /unbanall <#channel>

Postby vodkaplayer » Fri May 16, 2008 3:36 am

Code: Select all
alias unbanall {
  var %c = $iif($1,$1,$active),%i = 1
  if (!%c) { echo -a insufficient parameter | return }
  if ($me !isop %c) { echo %c I'm not an op on %c | return }
  if (!$chan(%c).ibl) { set %update.ibl %c | .mode %c +b | return }
  while ($ibl(%c,%i)) {
    var %b = $addtok(%b,$v1,32) | inc %i
    if ($numtok(%b,32) == $modespl) { mode %c $+(-,$str(b,$v2)) %b | var %b }
  }
  if ($numtok(%b,32)) { mode %c $+(-,$str(b,$v1)) %b }
  echo %c $ibl(%c,0) $iif($ibl(%c,0) > 1,bans have,ban has) been removed.
}
raw 368:& & & of Channel Ban List: { if ($2 == %update.ibl) { unset %update.ibl | unbanall $2 | haltdef } }



this is a correct code...

but at least /mode $chan -b *
work fine without updating ibl.
vodkaplayer
 


Return to Mirc Scripting Release

Who is online

Users browsing this forum: No registered users and 1 guest

cron