Bug fixed.

This commit is contained in:
Jeremy Fincher 2004-11-06 19:05:53 +00:00
parent df42550505
commit 21d5745677
3 changed files with 7 additions and 10 deletions

View File

@ -164,7 +164,7 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
registerBugzilla(name, url, description)
self.shorthand = utils.abbrev(self.db.keys())
irc.replySuccess()
add = wrap(add, ['text', 'url', additional('text')])
add = wrap(add, ['something', 'url', additional('text')])
def remove(self, irc, msg, args, name):
"""<abbreviation>
@ -337,7 +337,7 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
(utils.nItems('bug', len(bugs)), utils.quoted(searchstr),
' AND '.join(keywords), utils.commaAndify(map(str, bugids)))
irc.reply(s)
search = wrap(search, [getopts({'keywords':'text'}), 'text', 'text'])
search = wrap(search, [getopts({'keywords':'text'}), 'something', 'text'])
def bug(self, irc, msg, args, name, number):
"""<abbreviation> <number>
@ -369,7 +369,7 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
report['summary'] = self._mk_summary_string(summary, bold)
s = '%(zilla)s bug #%(id)s: %(title)s %(summary)s %(url)s' % report
irc.reply(s)
bug = wrap(bug, ['text', ('id', 'bug')])
bug = wrap(bug, ['something', ('id', 'bug')])
def _mk_summary_string(self, summary, bold):
L = []

View File

@ -164,7 +164,7 @@ class Fun(callbacks.Privmsg):
else:
s = 'I couldn\'t figure out that filename.'
irc.reply(s)
mimetype = wrap(mimetype, ['something'])
mimetype = wrap(mimetype, ['text'])
def md5(self, irc, msg, args, text):
"""<text>
@ -286,7 +286,7 @@ class Fun(callbacks.Privmsg):
'it with some smaller inputs.')
else:
irc.reply(str(utils.distance(s1, s2)))
levenshtein = wrap(levenshtein, ['text', 'text'])
levenshtein = wrap(levenshtein, ['something', 'text'])
def soundex(self, irc, msg, args, text, length):
"""<string> [<length>]
@ -296,7 +296,7 @@ class Fun(callbacks.Privmsg):
length, use 0.
"""
irc.reply(utils.soundex(text, length))
soundex = wrap(soundex, ['text', additional('int', 4)])
soundex = wrap(soundex, ['somethingWithoutSpaces', additional('int', 4)])
# The list of words and algorithm are pulled straight the mozbot
# MagicEightBall.bm module: http://tinyurl.com/7ytg7

View File

@ -171,7 +171,7 @@ class Http(callbacks.Privmsg):
(project, lastupdated, vitality, popularity, version))
except FreshmeatException, e:
irc.error(str(e))
freshmeat = wrap(freshmeat, ['something'])
freshmeat = wrap(freshmeat, ['text'])
def stockquote(self, irc, msg, args, symbol):
"""<company symbol>
@ -179,9 +179,6 @@ class Http(callbacks.Privmsg):
Gets the information about the current price and change from the
previous day of a given company (represented by a stock symbol).
"""
if ' ' in symbol:
irc.error('Only one stockquote can be looked up at a time.')
return
url = 'http://finance.yahoo.com/d/quotes.csv?s=%s' \
'&f=sl1d1t1c1ohgv&e=.csv' % symbol
quote = webutils.getUrl(url)