Fixed bug where factoids would raise a DatabaseError when there were no arguments given.

This commit is contained in:
Jeremy Fincher 2003-10-10 05:44:41 +00:00
parent d9d141a8e7
commit 1e8de55ff8
1 changed files with 2 additions and 0 deletions

View File

@ -361,6 +361,8 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
"""
channel = privmsgs.getChannel(msg, args)
(optlist, rest) = getopt.getopt(args, '', ['regexp=', 'exact='])
if not optlist and not rest:
raise callbacks.ArgumentError
criteria = []
formats = []
predicateName = 'p'