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

View File

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