I need a script to ban hosts that are IPs. They contain no letters, only numbers and decimals. I want it to perm ban them, but I also want it to be able to allow exceptions. So like, if it bans someone I actually want to allow access to my channel, it'll let them through. Anyone know of a script like this, or can make one for me? Thanks in advance.
the reason i want this, is because im trying to get around spammers. They come in using different proxies with different ips, and they mostly only use ips in their hostnames. So I wanted a way to ban them automatically when they enter, so that I don't have to see any more spam.
bind join - "#yourChan *" ipchk
proc ipchk {n u h c} {
if {![isbotnick $n]&&![validuser $h]&&[string match {*[0-9]} $u]} {
newchanban $c *!*@[lindex [split $u @] end] ${::botnet-nick} "I love you"
}
}
...to exempt people from being banned, add them to your bot. (if you have several regulars that should have no other privileges than being able to join without getting banned, add a single "exempt user" with multiple hosts and no flags
user's proc will ban ANYONE with unresolving host (who isn't recognized as a botuser) - not just alleged spammers - so beware what you wish(ed) for, for you might get it
I do usually always a !seen on the host before considering a wide ban. You might get really busy exempting wished users (and some might never return, because the don't understand IRC well enough to notice you didn't ban them but their whole hostmark style ^^). Maybe you just add wideban for the proxys, there aren't too many as long your Network g-lines open Proxys (and I hope all do today, but probably they don't ^^). If your network doesn't you might contact an IRC oper to ask if it planed.
some of the big 4 (i.e. EFnet and IRCnet) have pretty decentralized policies on this, so you might find yourself on a server that scans your hostname on connect for open proxies on well-known ports, or you may be using a server which couldn't care less - it's up to server's admin to install and use a proxy scanner
there are scripts (I've seen at least one) that scan users on join, but this is too heavy burden on eggdrop IMHO - it's far from easy to implement proper and efficient scanner in a script
besides, novadays most spammers don't use open proxies - they are spawned by trojans/viruses from infected windows boxes