From c68c941c1d309b84628e39765c724e7b545ae8dc Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 27 Aug 2016 09:50:53 -0700 Subject: [PATCH] Irc.msg: break on empty text strings Closes #306. --- classes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes.py b/classes.py index bb9acd2..d534566 100644 --- a/classes.py +++ b/classes.py @@ -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'