Converted to commands.py.

This commit is contained in:
Jeremy Fincher 2004-10-26 23:01:11 +00:00
parent a07f83ea9e
commit f6461699f6

View File

@ -37,7 +37,7 @@ __revision__ = "$Id$"
import supybot.plugins as plugins import supybot.plugins as plugins
import supybot.utils as utils import supybot.utils as utils
import supybot.privmsgs as privmsgs from supybot.commands import *
import supybot.webutils as webutils import supybot.webutils as webutils
import supybot.callbacks as callbacks import supybot.callbacks as callbacks
@ -248,19 +248,19 @@ class OSU(callbacks.Privmsg):
irc.reply('Possible matches: %s.' % ', '.join(emails)) irc.reply('Possible matches: %s.' % ', '.join(emails))
except Exception, e: except Exception, e:
irc.error(utils.exnToString(e)) irc.error(utils.exnToString(e))
email = privmsgs.thread(email) email = thread(email)
def building(self, irc, msg, args): def building(self, irc, msg, args, building):
"""<building abbreviation> """<building abbreviation>
Returns the address and full name of an OSU building based on its Returns the address and full name of an OSU building based on its
standard two-letter abbreviation. standard two-letter abbreviation.
""" """
building = privmsgs.getArgs(args)
try: try:
irc.reply(buildings[building.upper()]) irc.reply(buildings[building.upper()])
except KeyError: except KeyError:
irc.reply('I don\'t know of any such OSU building.') irc.reply('I don\'t know of any such OSU building.')
building = wrap(building, ['something'])
Class = OSU Class = OSU