mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
NetworkCore: return the server in get_server if the arg was a server
This commit is contained in:
parent
046fe0c385
commit
9113b34b46
@ -472,6 +472,9 @@ class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnake
|
||||
|
||||
def get_server(self, numeric):
|
||||
"""Finds the SID of the server a user is on."""
|
||||
if numeric in self.servers: # We got a server already (lazy hack)
|
||||
return numeric
|
||||
|
||||
userobj = self.users.get(numeric)
|
||||
if userobj:
|
||||
return userobj.server
|
||||
|
Loading…
Reference in New Issue
Block a user