http://pastebin.com/LJcgGy0M
Save as ktonolak.py
EDIT: Thanks to Sample for a better Polish translation.
EDIT2: Thanks to ilplayde and EssigGurkenFred for helping with the German translation
EDIT3: Thanks to xNyan for the Brazilian translation.
This is a little script that stops the more commonly heard spam messages from people asking if anyone is Polish/Brazilian/German/whatever, and sends them a (probably really poorly worded) message in their native language reminding them that they're in an English-speaking server. I added "kurwa" as well because that's another common one to hear.
This is in no way intended to be xenophobic, it's just I know how annoying it can be when you have 4 people all spamming "KTO POLAK" every few seconds. Conversely, if you run a non-English-speaking server and are sick of people speaking English, you can change the dictionary to suit your needs.
If anyone has either a better translation for the user messages (they should be good enough to get the point across), or any other words then think should go in the dictionary, let me know. The ones I added were just the ones I'd seen quite often. Also note that, yes, there are ways for people to get around the filter, but this should be good enough to stop the innocent ones, and you can probably mute them safely if they keep on spamming.