mIRC Home    About    Download    Register    News    Help

Print Thread
Removing on banlist #172210 07/03/07 10:49 AM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
How to get the ban list then get only the bans that's matches your nick!ident@host then auto unban them?


learn learn learn
Re: Removing on banlist [Re: learn3r] #172224 07/03/07 03:55 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
/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
    }
  }
}

Last edited by HaleyJ; 07/03/07 05:46 PM.

Newbie
Re: Removing on banlist [Re: learn3r] #172227 07/03/07 04:14 PM
Joined: Jan 2007
Posts: 259
K
Kardafol Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
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.


Those who can, cannot. Those who cannot, can.
Re: Removing on banlist [Re: learn3r] #172240 07/03/07 07:32 PM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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.


learn learn learn