3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

pr/inspircd: part messages are optional...

This commit is contained in:
James Lu 2015-07-04 19:08:58 -07:00
parent d23d34e316
commit 35346d7990

View File

@ -198,7 +198,11 @@ def handle_part(irc, source, command, args):
irc.channels[channel].users.remove(source)
if not irc.channels[channel].users:
del irc.channels[channel]
return {'channel': channel, 'reason': args[1]}
try:
reason = args[1]
except IndexError:
reason = ''
return {'channel': channel, 'reason': reason}
def handle_error(irc, numeric, command, args):
irc.connected = False