mIRC Home    About    Download    Register    News    Help

Print Thread
How can I auto ban/block/kick/blacklist a ISP? #169005 18/01/07 01:50 AM
Joined: Jan 2007
Posts: 31
J
Justin_F Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2007
Posts: 31
Hello everyone,

I would like to know is there any possible way to block a certain isp from entering my channel?
I want to block everyone with a aol.com hostmask. The reason for this being their hostmask always changes and bypasses my banlist.

I have no clue on how to do this or if there are any commands to do so. The only thing I can think of was setting up a type of a AutoVoice script that will KB them.

Php Code:

on *:JOIN:#: {
  if (%AntiAOL. [ $+ [ $chan ] ] == on) {
  .ban -k $chan $nick }
  elseif (%AntiAOL. [ $+ [ $chan ] ] == off) { HALT }
  else { halt }
}
} 


Something along those lines using a remote script to activate. But that is totally wrong.

If anyone has any clue on how to rid a certain ISP please tell smile

Thanks.

Last edited by Justin_F; 18/01/07 01:51 AM.
Re: How can I auto ban/block/kick/blacklist a ISP? [Re: Justin_F] #169018 18/01/07 05:16 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As long as they aren't showing an IP instead of HOST, you can use:

Code:
on @*:join:#yourchannel: {
  if (aol.com isin $wildsite) { ban -ku300 $chan $nick AOL Sucks! }
}


Invision Support
#Invision on irc.irchighway.net
Re: How can I auto ban/block/kick/blacklist a ISP? [Re: Riamus2] #171595 26/02/07 01:56 PM
Joined: Feb 2007
Posts: 28
S
sner Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Feb 2007
Posts: 28

Here's an additional robust code and very simple..

Code:
on 1*:join:#Channelname: {
  if (*!*@hostmask iswm $address($nick,2)) {
    mode #Channelname +b $address($nick,2)
    kick #Channelname $nick ( whatever your reason is )
  }
}

Hope that helps =)

Re: How can I auto ban/block/kick/blacklist a ISP? [Re: sner] #171632 26/02/07 10:52 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The usage of the 1 prefix in the on join event is irrelevant when combined with the * wildcard. Also most networks require you to have ops in the channel before allowing you to set a mode and/or kick (likewise with ban), and your code doesn't check for that.

The usage of the @ character in the prefix section of the on join event (as shown in Riamus' code) ensures that the client (person/bot) running the code has ops in the channel before issuing the ban command.
If you were to look at the actual sequence of events that are completed when the ban command is issued with the -k switch, you would see that the ban mode is set first, then the person is kicked.

For the above reasons, I find that Riamus' code to be superior.