From ddd043693791cdeb238b966097bf0920e06d5a62 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 9 Nov 2016 18:52:51 -0800 Subject: [PATCH] Irc: rewrite getServer() to look for IrcUser.server attribute (#355) The relevant attribute was introduced in c57fabc9ef2f9acecc70130e6f48c17ab435dc6d. --- classes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes.py b/classes.py index 72e8fbb..d619508 100644 --- a/classes.py +++ b/classes.py @@ -890,9 +890,9 @@ class Irc(): def getServer(self, numeric): """Finds the SID of the server a user is on.""" - for server in self.servers: - if numeric in self.servers[server].users: - return server + userobj = self.users.get(numeric) + if userobj: + return userobj.server def isManipulatableClient(self, uid): """