mIRC Home    About    Download    Register    News    Help

Print Thread
/ban #172242 07/03/07 07:51 PM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
/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?


learn learn learn
Re: /ban [Re: learn3r] #172244 07/03/07 08:07 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Online
Hoopy frood
Online
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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


Invision Support
#Invision on irc.irchighway.net
Re: /ban [Re: Riamus2] #172261 08/03/07 01:57 AM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
Thank you


learn learn learn
Re: /ban [Re: learn3r] #172265 08/03/07 03:18 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Online
Hoopy frood
Online
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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


Invision Support
#Invision on irc.irchighway.net
Re: /ban [Re: Riamus2] #172284 08/03/07 11:30 AM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
Quote:
/ban: insufficient parameters (line 8, script4.mrc)


got that when i tried
/kban #chan nick nick



learn learn learn
Re: /ban [Re: learn3r] #172295 08/03/07 04:31 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Online
Hoopy frood
Online
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: /ban [Re: Riamus2] #172310 08/03/07 09:22 PM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
tried 2 clones but i think it`ll work

nick,nick

don`t know actually'



Code:
DALnet server

Last edited by learn3r; 08/03/07 09:23 PM.

learn learn learn
Re: /ban [Re: learn3r] #172323 08/03/07 10:35 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Online
Hoopy frood
Online
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: /ban [Re: Riamus2] #172402 09/03/07 05:03 PM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
Quote:
//kban # nick nick

i tried that but it did this...

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


learn learn learn
Re: /ban [Re: learn3r] #172408 09/03/07 07:00 PM
Joined: Mar 2007
Posts: 2
M
Morris Offline
Bowl of petunias
Offline
Bowl of petunias
M
Joined: Mar 2007
Posts: 2
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




Irc.Atrum.org - Irc.korras.za.net
Re: /ban [Re: learn3r] #172413 09/03/07 07:13 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Online
Hoopy frood
Online
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.

Last edited by Riamus2; 10/03/07 12:26 AM.

Invision Support
#Invision on irc.irchighway.net
Re: /ban [Re: Morris] #172424 10/03/07 12:12 AM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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




learn learn learn