Ban IP by ping

How can i block ip's by ping?Etc. i play a game connects me with some players..can i block connection with ip's etc. over 60ms ping??
Maybe a script that ping's connections..measure ping and if someone is over 60ms ping to block him.

Hi not with banip but see here:

Thank you very much...any simillar to this?