check if message isn't None, rather than falsey

This commit is contained in:
jesopo 2020-03-08 15:12:21 +00:00
parent 1d384dfd8b
commit 13943e84a2

View file

@ -64,7 +64,7 @@ def message(events, event):
action = False action = False
if message: if not message == None:
ctcp_message = utils.irc.parse_ctcp(message) ctcp_message = utils.irc.parse_ctcp(message)
if ctcp_message: if ctcp_message:
@ -97,7 +97,7 @@ def message(events, event):
hook = events.on(direction).on(event_type).on(context) hook = events.on(direction).on(event_type).on(context)
buffer_line = None buffer_line = None
if message: if not message == None:
buffer_line = IRCBuffer.BufferLine(user.nickname, message, action, buffer_line = IRCBuffer.BufferLine(user.nickname, message, action,
event["line"].tags, from_self, event["line"].command) event["line"].tags, from_self, event["line"].command)