mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2007
Posts: 31
J
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.
Joined: Oct 2004
Posts: 8,330
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
Joined: Feb 2007
Posts: 28
S
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 =)

Joined: Aug 2004
Posts: 7,252
R
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.


Link Copied to Clipboard