From 577e7517af66d8ef59176a6d94cb777e6b06084c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 24 Aug 2003 20:58:11 +0000 Subject: [PATCH] Made the output of osuemail a little bit cleaner. --- plugins/OSU.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/OSU.py b/plugins/OSU.py index cbdc186ec..a53e517d1 100644 --- a/plugins/OSU.py +++ b/plugins/OSU.py @@ -248,10 +248,12 @@ class OSU(callbacks.Privmsg): line.strip() if 'Published address' in line: emails.append(line.split()[-1]) - if emails: - irc.reply(msg, 'Possible matches: %s' % ', '.join(emails)) - else: + if len(emails) == 0: irc.reply(msg, 'There seem to be no matches to that name.') + elif len(emails) == 1: + irc.reply(msg, emails[0]) + else: + irc.reply(msg, 'Possible matches: %s' % ', '.join(emails)) except Exception, e: irc.error(msg, debug.exnToString(e))