mirror of
https://github.com/chocolate-doom/master-server.git
synced 2024-11-24 13:21:47 +00:00
Rework blocking.
Log attempts from banned servers and only block adds, not other requests.
This commit is contained in:
parent
118c62ba4b
commit
c0975c8f53
1 changed files with 4 additions and 3 deletions
|
@ -240,6 +240,10 @@ class MasterServer:
|
|||
def process_add_to_master(self, addr):
|
||||
""" Process an "add to master" request received from a server. """
|
||||
|
||||
if self.is_blocked(addr):
|
||||
self.log_output(addr, "Ignoring add from banned server")
|
||||
return
|
||||
|
||||
if addr in self.servers:
|
||||
self.log_output(addr, "Refresh server")
|
||||
server = self.servers[addr]
|
||||
|
@ -377,9 +381,6 @@ class MasterServer:
|
|||
|
||||
data, addr = self.sock.recvfrom(1400)
|
||||
|
||||
if self.is_blocked(addr):
|
||||
return
|
||||
|
||||
try:
|
||||
self.process_packet(data, addr)
|
||||
except Exception, e:
|
||||
|
|
Loading…
Reference in a new issue