They should be easy to find on any of the scripting sites. But here is a VERY basic example.

Code:
menu nicklist { Ban Nick:slist $address($$1,2) }
menu channel { Ban Address:slist $$?="Enter Address to ban" }
alias slist { write banlist.txt $1- }
on @*:join:#: {
  var %t = $lines(banlist.txt)
  while (%t) {
    if ($read(banlist.txt,nt,%t) iswm $address($nick)) { ban -ku300 $chan $v1 | break }
    dec %t
  }
}


Some things to note...

You should be able to enter the ban address in any format, though I haven't tested this. The nicklist right click menu will use *!*@host.com format (type 2), though you can change that by just changing the 2. The channel right click menu will use whatever format you enter. It will not check to make sure you entered a valid format.

It will then loop through the bans whenever someone joins the channel. If it finds a match, then it will kick/ban the person and the ban will automatically remove after 300 seconds, which you can change if you want. The automatic removal is what keeps your ban list clear. If it doesn't find a match, nothing is done. It will also automatically stop looking for matches as soon as it finds one to make the script more efficient.

The ban will be set using the first ban format that matches that you set up.

Note that your choice of ban format will affect how strict or not strict this script is. For example, if you set a ban for:

spammer!blah@mirc.com

and someone joins with an address of spammer!~blah@mirc.com or spammer2!blah@mirc.com, the person will not be banned. On the other hand, if you enter the ban as:

*!*@*.mirc.com

then it will ban anyone with a mirc.com host (as long as their address shows the host and not an IP, of course). So be careful how you set the bans as you may set them too strict or too weak to be any use.

Note that this will not do anything if you (or the bot running the script) is not an op. There is also not a remove option, but you can manually remove the bans from the text file.

----------

Now, like I said, this is a VERY basic script. There will be ways to make it more efficient and features that could be added that would make it better. But I don't use such scripts and don't really know what the best setup for them would be. As I mentioned, you should be able to easily find this kind of script on a scripting site and it will probably be better than this one. Remember that the scripts on such sites are tested and often have comments that will give you an idea of how good the script is.

Someone else might even write a better script here as well. But the script above should at least be a start. Normally, something like this would be best with a dialog that works similar to the channel control dialog that you would normally use for bans and modes. But that requires more scripting than this basic version is going to show.