3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-13 12:01:04 +01:00

Irc: rewrite getServer() to look for IrcUser.server attribute (#355)

The relevant attribute was introduced in c57fabc9ef2f9acecc70130e6f48c17ab435dc6d.
This commit is contained in:
James Lu 2016-11-09 18:52:51 -08:00
parent c57fabc9ef
commit ddd0436937

View File

@ -890,9 +890,9 @@ class Irc():
def getServer(self, numeric): def getServer(self, numeric):
"""Finds the SID of the server a user is on.""" """Finds the SID of the server a user is on."""
for server in self.servers: userobj = self.users.get(numeric)
if numeric in self.servers[server].users: if userobj:
return server return userobj.server
def isManipulatableClient(self, uid): def isManipulatableClient(self, uid):
""" """