From 0d1f9d5bdc2e76a258e56e01a603a72ff0da4e29 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 12 Aug 2012 09:55:19 +0200 Subject: [PATCH] Fixed a bug in object's __eq__ that returned erroneous fails. --- src/commands/cmdhandler.py | 2 +- src/objects/objects.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/cmdhandler.py b/src/commands/cmdhandler.py index 86ba15be45..546863c3c6 100644 --- a/src/commands/cmdhandler.py +++ b/src/commands/cmdhandler.py @@ -197,7 +197,7 @@ def cmdhandler(caller, raw_string, testing=False): if len(matches) > 1: # We have a multiple-match syscmd = yield cmdset.get(CMD_MULTIMATCH) - sysarg = _("There where multiple matches.") + sysarg = _("There were multiple matches.") if syscmd: syscmd.matches = matches else: diff --git a/src/objects/objects.py b/src/objects/objects.py index 30eb8bc7ad..ca8b6b3dc9 100644 --- a/src/objects/objects.py +++ b/src/objects/objects.py @@ -362,13 +362,13 @@ class Object(TypeClass): parent doesn't work. """ try: - return _GA(self, "dbid") == other \ - or _GA(self, "dbid") == _GA(other, "dbid") + return _GA(_GA(self, "dbobj"),"dbid") == other \ + or _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid") except AttributeError: # compare players instead try: - return _GA(_GA(self, "player"),"uid") == other \ - or _GA(_GA(self, "player"),"uid") == _GA(_GA(other, "player"),"uid") + return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == other \ + or _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid") except AttributeError: return False