Ban IP by ping

Hello....
How can i block ip's by ping?Etc. i play a game online..it 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?