Munge Author's email in __str__ instead of relying on munging the results of Author.__str__

This commit is contained in:
James Vega 2006-07-14 20:54:31 +00:00
parent 1be3d7f159
commit c3cacbce76
2 changed files with 4 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class Plugin(callbacks.Plugin):
return return
module = cb.classModule module = cb.classModule
if hasattr(module, '__author__') and module.__author__: if hasattr(module, '__author__') and module.__author__:
irc.reply(utils.web.mungeEmail(str(module.__author__))) irc.reply(str(module.__author__))
else: else:
irc.reply('That plugin doesn\'t have an author that claims it.') irc.reply('That plugin doesn\'t have an author that claims it.')
author = wrap(author, [('plugin')]) author = wrap(author, [('plugin')])

View File

@ -43,8 +43,9 @@ 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) return '%s (%s) <%s>' % (self.name, self.nick,
utils.web.mungeEmail(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')
jamessan = Author('James Vega', 'jamessan', 'jamessan@users.sf.net') jamessan = Author('James Vega', 'jamessan', 'jamessan@users.sf.net')