mIRC Homepage

/ban

Posted By: learn3r

/ban - 07/03/07 07:51 PM

/ban -k # nick1 nick2 nick3

will do
+bbb nick1!ident@host nick2!ident@host nick3!ident@host
then kicks them all

is it possible to ban their *!*@host only all three of them?
Posted By: Riamus2

Re: /ban - 07/03/07 08:07 PM

You can only use -k with nicks and not with addresses. If you want to ban and kick using addresses, then you'll need to have 2 separate commands:

ban # nick!ident@host nick2!ident@host nick3!ident@host
kick # nick nick2 nick3
Posted By: learn3r

Re: /ban - 08/03/07 01:57 AM

Thank you
Posted By: Riamus2

Re: /ban - 08/03/07 03:18 AM

You *could* make a custom alias for it...

Code:
alias kban {
  if ($1 ischan) {
    var %cnt = 2
    while (%cnt <= $0) {
      var %bans = %bans $iif($($+($,%cnt),2) ison $chan,$address($($+($,%cnt),2),2))
      inc %cnt
    }
    ban $1 %bans
    kick $1 $2-
  }
}


Use: /kban #chan nick nick nick nick

As a note, you could also have the ban type specified:
Code:
alias kban {
  if ($1 ischan) {
    var %cnt = 3
    while (%cnt <= $0) {
      var %bans = %bans $iif($($+($,%cnt),$2) ison $chan,$address($($+($,%cnt),2),$2))
      inc %cnt
    }
    ban $1 %bans
    kick $1 $3-
  }
}


Use: /kban # <type> nick nick nick nick
Example: /kban #chan 2 nick nick nick nick
Posted By: learn3r

Re: /ban - 08/03/07 11:30 AM

Quote:
/ban: insufficient parameters (line 8, script4.mrc)


got that when i tried
/kban #chan nick nick

Posted By: Riamus2

Re: /ban - 08/03/07 04:31 PM

The nicks are on the channel, right? This will only work for nicks who are currently in the channel.

Other than that, can you insert this line:

echo -a ban $1 %bans

Before the ban $1 %bans line? Then we can see where the problem is. I didn't want to ban people in my channel, so I just used echo instead and it seems to work fine. Let me know what you get for an echo.
Posted By: learn3r

Re: /ban - 08/03/07 09:22 PM

tried 2 clones but i think it`ll work

nick,nick

don`t know actually'



Code:
DALnet server
Posted By: Riamus2

Re: /ban - 08/03/07 10:35 PM

No commas.

/kban #channel nick nick nick

Commas will cause it to fail.

As for the echo? "Dalnet server" wouldn't be the echo that you should see from what I gave you.
Posted By: learn3r

Re: /ban - 09/03/07 05:03 PM

Quote:
//kban # nick nick

i tried that but it did this...

operator Sets Mode:(+b) *!*@host
* nick was kicked by operator (nick1)
Posted By: Morris

Re: /ban - 09/03/07 07:00 PM

I use this... The second one is for a Multiple ban, add this to ur alias, ths command must be done in the chan that u want to ban the user(s) from.

/kb /ban $chan $$1 3 | /kick $chan $$1 $2- | /notice $$1 You were banned because: $2-

/kb /ban $chan $$1 $2 $3 $4 3 | /kick $chan $$1 $2 $3 $4 $2- | /notice $$1 $2 $3 $4 You were banned because: $2-


Eg. (/kb nick1 nick2 nick3 nick4 Advertsing
It will then ban them, kick them and notice them "You were banned because": Advertising


Posted By: Riamus2

Re: /ban - 09/03/07 07:13 PM

I think you misunderstand what I'm asking for with the echo. smile

Here:
Code:
alias kban {
  if ($1 ischan) {
    var %cnt = 2
    while (%cnt <= $0) {
      var %bans = %bans $iif($($+($,%cnt),2) ison $chan,$address($($+($,%cnt),2),2))
      inc %cnt
    }
    echo -a Bans: $1 %bans
    ban $1 %bans
    kick $1 $replace($2-,$chr(32),$chr(44))
  }
}


Then, when you try, it will echo something starting with Bans: ... paste that in and it will show up what's happening. I'll see if I can see any issues here, but like I said, it seems to work okay here with echo.
Posted By: learn3r

Re: /ban - 10/03/07 12:12 AM

Code:
/kick $chan $$1 $2 $3 $4 $2-

this will only result to /kick # $nick1 ($nick2)



syntax of kicking:

Code:
kick $chan nick,nick,nick kickmessage


© 2021 mIRC Discussion Forums