diff options
| author | Teddy Wing | 2015-06-14 18:50:27 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2015-06-14 18:50:27 -0400 | 
| commit | bef0d13cf98bb8d8bb354b6cc6181b6729aaa04b (patch) | |
| tree | 8751f5cbc2be3e0d31ad1323d483e38c49b834b5 | |
| parent | d8ec1e64766e3976c21a282cd442442e4daf3533 (diff) | |
| download | irssi-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.pl | 6 | 
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);  		}  	}  }; | 
