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
1 changed files with 4 additions and 1 deletions

View File

@ -381,8 +381,11 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
else:
try:
port = int(port)
if not (0 < port < 65536):
raise 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
cbs = map(irc.getCallback, ['Owner', 'ConfigAfter376'])
newIrc = irclib.Irc(irc.nick, irc.user, irc.ident,