From b4bb1e259d96da12b5d280a58ac984d6287015ad Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Jun 27 2008 06:04:30 +0000 Subject: added ext function --- diff --git a/plugin.py b/plugin.py index 6bb2ae9..64d5175 100644 --- a/plugin.py +++ b/plugin.py @@ -205,6 +205,19 @@ class Fedora(callbacks.Plugin): irc.reply('Unapproved Groups: %s' % unapproved) fasinfo = wrap(fasinfo, ['text']) + def ext(self, irc, msg, args, name): + """ + + Return the talk.fedoraproject.org extension number for a Fedora Account + System username.""" + try: + person = self.fasclient.person_by_username(name) + except: + irc.reply('Error getting info for user: "%s"' % name) + return + irc.reply("5%i" % person['id']) + ext = wrap(ext, ['text']) + def _ticketer(self, baseurl, num): url = format(baseurl, str(num)) size = conf.supybot.protocols.http.peekSize()