mIRC Homepage
Posted By: learn3r Removing on banlist - 07/03/07 10:49 AM
How to get the ban list then get only the bans that's matches your nick!ident@host then auto unban them?
Posted By: HaleyJ Re: Removing on banlist - 07/03/07 03:55 PM
/ban.check in any active window, although i dont see the use.

Code:
alias ban.check {
  if ($me isop $chan) {
  echo -a Clearing matching bans on $chan
    var %i = 1
    while (%i <= $ibl($chan,0)) {
      var %ban = $ibl($chan,%i)
      if (%ban iswm $address($me,5)) {
        mode $chan -b $ifmatch
      }
      inc %i
    }
  }
}
Posted By: Kardafol Re: Removing on banlist - 07/03/07 04:14 PM
You can use your own mask ($address($me,5)), and check if its a wildmatch against the channels ban list ($ibl($chan,N), where 0 means total, 1 is the first)
Heres a simple alias:
Code:
alias clearban {
  ; /clearban Channel [nick!user@host]
  var %b = $iif($2,$2,$address($me,5)), %x = $ibl($1,0), %unban
  while (%x) {
    if ($ibl($1,%x) iswm %b) {
      var %unban = %unban $v1
    }
    if ($numtok(%unban,32) > 5) {
      mode $1 -bbbbbb %unban
      var %unban
    }
    dec %x
  }
  if (%unban) {
    mode $1 $+(-,$str(b,$numtok(%unban,32))) %unban
  }
  echo -ac info * Done clearing bans.
}
menu channel {
  Remove bans matching me: {
    if ($me isop $chan) clearban $active
    else echo -ac info * $me $+ : You're not a channel operator.
  }
}

You should get a popup in the channel window allowing you to unban yourself. You can also do /clearban #channel, or /clearban #channel $address(friend'snick,5) to unban him/her.
Posted By: learn3r Re: Removing on banlist - 07/03/07 07:32 PM
Thanks guys
i just want to unban myself by not using services command on a server and don't delete the other banned masks on the channel.
© mIRC Discussion Forums