aboutsummaryrefslogtreecommitdiff
path: root/IRCLineHandler.py
diff options
context:
space:
mode:
authorGravatar Evelyn2017-07-20 21:12:42 +0100
committerGravatar Evelyn2017-07-20 21:12:42 +0100
commit5466edfafe232bbacff5bc087dc980cdbac079b6 (patch)
tree8333a6d23d5809cda9850b37ec98bf75edae8be7 /IRCLineHandler.py
parentfix the privmsg (diff)
signature
Don't assume a reason will always be present in a PART
Diffstat (limited to 'IRCLineHandler.py')
-rw-r--r--IRCLineHandler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py
index eb3c5223..bb9e7a4f 100644
--- a/IRCLineHandler.py
+++ b/IRCLineHandler.py
@@ -167,7 +167,7 @@ def handle_PART(data):
server = data.server
nickname, username, hostname = Utils.seperate_hostmask(data.prefix)
channel = server.get_channel(data.args[0])
- reason = data.args[1]
+ reason = data.args[1] if len(args)>1 else ""
if not server.is_own_nickname(nickname):
user = server.get_user(nickname)
bot.events.on("received").on("part").call(data=data, channel=channel,