No need for checking, commands.wrap rocks.

This commit is contained in:
Jeremy Fincher 2004-10-01 22:35:34 +00:00
parent 567f0b0001
commit 71e18515d7

View File

@ -311,18 +311,6 @@ class Channel(callbacks.Privmsg):
self.log.warning('%r tried to make me kban myself.', msg.prefix) self.log.warning('%r tried to make me kban myself.', msg.prefix)
irc.error('I cowardly refuse to kickban myself.') irc.error('I cowardly refuse to kickban myself.')
return return
try:
length = int(length or 0)
if length < 0:
irc.error('Ban length must be a non-negative integer.')
return
except ValueError:
if reason:
reason = ' '.join((length, reason))
length = 0
else:
irc.error('Ban length must be a non-negative integer.')
return
if not reason: if not reason:
reason = msg.nick reason = msg.nick
try: try: