From 21d57456771e21a61ed4ace157d4c13bdfbe3fa9 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 6 Nov 2004 19:05:53 +0000 Subject: [PATCH] Bug fixed. --- plugins/Bugzilla.py | 6 +++--- plugins/Fun.py | 6 +++--- plugins/Http.py | 5 +---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/plugins/Bugzilla.py b/plugins/Bugzilla.py index ee82671b7..26712af24 100644 --- a/plugins/Bugzilla.py +++ b/plugins/Bugzilla.py @@ -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): """ @@ -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): """ @@ -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 = [] diff --git a/plugins/Fun.py b/plugins/Fun.py index fc161fff2..b71140917 100644 --- a/plugins/Fun.py +++ b/plugins/Fun.py @@ -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): """ @@ -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): """ [] @@ -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 diff --git a/plugins/Http.py b/plugins/Http.py index 9ac2a8714..6e04f9889 100644 --- a/plugins/Http.py +++ b/plugins/Http.py @@ -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): """ @@ -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)