delbans/clearbans

By Jared on Sep 13, 2005

alias delbans will remove all YOUR bans in the channel, clearbans will remove all bans in channel. Simple but effective.It's been done before, but...

alias delbans {
  set %chan- #
  set %ooo 0
  :start
  inc %ooo
  if ($ibl(%chan-,%ooo) == $null) { goto end }
  if ($gettok($ibl(%chan-,%ooo).by,1,33) == $me) {
    mode %chan- -b $ibl(%chan-,%ooo)
    goto start
  }
  goto start
  :end
}
alias clearbans {
  set %chan- #
  set %ooo 0
  :start
  inc %ooo
  if ($ibl(%chan-,%ooo) == $null) { goto end }
  mode %chan- -b $ibl(%chan-,%ooo)
  goto start
  :end
}

Comments

Sign in to comment.
NoFx   -  May 07, 2006

Nice Jared.. :)

 Respond  
Jared   -  Sep 14, 2005

OK :) now I\'m reading about while loops, thanx for the comments xDaeMoN :)

 Respond  
xDaeMoN   -  Sep 14, 2005

Makes the code simpler.

here\'s the /while version of your clearbans alias.

alias clearbans {
var %b = 1
while $ibl(#,%b) {
mode # -b $v1
inc %b
}
}

 Respond  
Jared   -  Sep 14, 2005

mIRC Code Snippets > a few modes by paNix3d
Posted: Sep 11, 2005 7:18 pm
Instead of using /goto, use /while loops.

Just a question...which is the convenience of using /while?

 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.