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

Irc.msg: break on empty text strings

Closes #306.
This commit is contained in:
James Lu 2016-08-27 09:50:53 -07:00
parent 9e7d0a50ca
commit c68c941c1d

View File

@ -496,7 +496,11 @@ class Irc():
def msg(self, target, text, notice=False, source=None):
"""Handy function to send messages/notices to clients. Source
is optional, and defaults to the main PyLink client if not specified."""
if not text:
return
source = source or self.pseudoclient.uid
if notice:
self.proto.notice(source, target, text)
cmd = 'PYLINK_SELF_NOTICE'