Eh, just some more error checking on a broken command.

This commit is contained in:
Jeremy Fincher 2003-10-22 01:49:11 +00:00
parent 9c2a8121ec
commit bd87b8ba58

View File

@ -381,8 +381,11 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
else: else:
try: try:
port = int(port) port = int(port)
if not (0 < port < 65536):
raise ValueError
except ValueError: except ValueError:
irc.error(msg, '<port> must be an integer.') irc.error(msg, '<port> must be an integer greater than 0 '
'and less than 65536.')
return return
cbs = map(irc.getCallback, ['Owner', 'ConfigAfter376']) cbs = map(irc.getCallback, ['Owner', 'ConfigAfter376'])
newIrc = irclib.Irc(irc.nick, irc.user, irc.ident, newIrc = irclib.Irc(irc.nick, irc.user, irc.ident,