Don't repeat nick in supybot.Author if nick and name are the same

This is the case e.g. for quantumlemur's plugins.
This commit is contained in:
James Lu 2019-10-19 10:16:35 -07:00
parent 7ac2828ab2
commit e7f033539b

View File

@ -47,7 +47,10 @@ class Author(object):
self.email = email self.email = email
def __str__(self): 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. class authors(object): # This is basically a bag.
jemfinch = Author('Jeremy Fincher', 'jemfinch', 'jemfinch@users.sf.net') jemfinch = Author('Jeremy Fincher', 'jemfinch', 'jemfinch@users.sf.net')