aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-06-14 18:50:27 -0400
committerTeddy Wing2015-06-14 18:50:27 -0400
commitbef0d13cf98bb8d8bb354b6cc6181b6729aaa04b (patch)
tree8751f5cbc2be3e0d31ad1323d483e38c49b834b5
parentd8ec1e64766e3976c21a282cd442442e4daf3533 (diff)
downloadirssi-hipchat-stfu-bef0d13cf98bb8d8bb354b6cc6181b6729aaa04b.tar.bz2
Stop output of empty messages
Don't write blank messages, only write messages with text.
-rw-r--r--hipchat-stfu.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/hipchat-stfu.pl b/hipchat-stfu.pl
index 30b15c2..10fcc23 100644
--- a/hipchat-stfu.pl
+++ b/hipchat-stfu.pl
@@ -40,11 +40,13 @@ sub hipchat_stfu {
if ($server->{'chatnet'} eq 'Bitlbee' &&
$nick eq 'root') {
- if ($text =~ /^\s*$/) {
+ my $msg = prettify_hipchat($text);
+
+ if ($msg eq '') {
signal_stop();
}
else {
- signal_continue($server, prettify_hipchat($text), $nick, $address, $target);
+ signal_continue($server, $msg, $nick, $address, $target);
}
}
};