Don't assume a reason will always be present in a PART
This commit is contained in:
parent
e245b64b58
commit
5466edfafe
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ def handle_PART(data):
|
||||||
server = data.server
|
server = data.server
|
||||||
nickname, username, hostname = Utils.seperate_hostmask(data.prefix)
|
nickname, username, hostname = Utils.seperate_hostmask(data.prefix)
|
||||||
channel = server.get_channel(data.args[0])
|
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):
|
if not server.is_own_nickname(nickname):
|
||||||
user = server.get_user(nickname)
|
user = server.get_user(nickname)
|
||||||
bot.events.on("received").on("part").call(data=data, channel=channel,
|
bot.events.on("received").on("part").call(data=data, channel=channel,
|
||||||
|
|
Loading…
Reference in a new issue