Kick banned IP's from the server

This commit is contained in:
Kyle Warwick-Mathieu 2015-09-08 17:11:13 -04:00
parent 8c4d53eae8
commit d019e9b31f

View File

@ -204,6 +204,11 @@ class PlayerSession(LineReceiver):
commands, self.remaining_message = \
gs_query.parse_gamespy_message(data)
if self.db.is_banned({'ipaddr':self.address.host}):
self.log(logging.DEBUG, "**** Banned user, closing network socket for %s..." % (self.address.host))
self.transport.abortConnection()
return
cmds = {
"login": self.perform_login,