3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-03-01 20:10:44 +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) irc.channels[channel].users.remove(source)
if not irc.channels[channel].users: if not irc.channels[channel].users:
del irc.channels[channel] 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): def handle_error(irc, numeric, command, args):
irc.connected = False irc.connected = False