Only allow numeric ids.

This commit is contained in:
Jeremy Fincher 2004-08-31 19:28:43 +00:00
parent 9efe550b52
commit 029218b56e

View File

@ -203,6 +203,10 @@ class Http(callbacks.Privmsg):
"""
id = privmsgs.getArgs(args, required=0, optional=1)
if id:
try:
id = int(id)
except ValueError:
irc.error('Invalid id: %s' % id, Raise=True)
id = 'quote=%s' % id
else:
id = 'random'