From e7f033539b2c894dc2d973c3b3c98c019fb0afce Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 19 Oct 2019 10:16:35 -0700 Subject: [PATCH] Don't repeat nick in supybot.Author if nick and name are the same This is the case e.g. for quantumlemur's plugins. --- src/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/__init__.py b/src/__init__.py index c8b1831ae..883b8fa14 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -47,7 +47,10 @@ class Author(object): self.email = email def __str__(self): - return '%s (%s) <%s>' % (self.name, self.nick, self.email) + if self.name != self.nick: + return '%s (%s) <%s>' % (self.name, self.nick, self.email) + else: + return '%s <%s>' % (self.name, self.email) class authors(object): # This is basically a bag. jemfinch = Author('Jeremy Fincher', 'jemfinch', 'jemfinch@users.sf.net')