Merge pull request #42 from MCAU/master

Don't attempt to send empty messages
This commit is contained in:
Chris 2019-10-04 17:33:17 -07:00 committed by GitHub
commit 6c19231c1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

5
.gitignore vendored
View File

@ -1,3 +1,6 @@
/target/
/nbactions.xml
/dependency-reduced-pom
/dependency-reduced-pom.xml
/.idea/
/*.iml

View File

@ -80,7 +80,7 @@ public class IRCMessageQueueWatcher {
}
private void blockingIRCMessage(final String target, final String message) {
if (!ircBot.isConnected()) {
if (!ircBot.isConnected() || message.isEmpty()) {
return;
}
plugin.logDebug("[blockingIRCMessage] About to send IRC message to " + target + ": " + message);
@ -89,7 +89,7 @@ public class IRCMessageQueueWatcher {
}
private void blockingCTCPMessage(final String target, final String message) {
if (!ircBot.isConnected()) {
if (!ircBot.isConnected() || message.isEmpty()) {
return;
}
plugin.logDebug("[blockingCTCPMessage] About to send IRC message to " + target + ": " + message);
@ -98,7 +98,7 @@ public class IRCMessageQueueWatcher {
}
private void blockingNoticeMessage(final String target, final String message) {
if (!ircBot.isConnected()) {
if (!ircBot.isConnected() || message.isEmpty()) {
return;
}
plugin.logDebug("[blockingNoticeMessage] About to send IRC notice to " + target + ": " + message);