[Kareha] Ban only posters by IP? (14)

4 Name: !WAHa.06x36 2005-08-18 10:22 ID:tzIjPQGA [Del]

I see.

Here's a quick one-liner:

make_error("BANNED!") if(grep { $_ eq $ENV{REMOTE_ADDR} } read_array("ban.txt"));

You could of course make the $_ eq $ENV{REMOTE_ADDR} test more clever if you wanted IP ranges. wakautils.pl has a convenient dot_to_dec() function for converting IP addresses to integers, which would help with that.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: