Don't send blank death messages to IRC.

This commit is contained in:
cnaude 2015-10-08 08:41:49 -07:00
parent 33bed55111
commit 3c71797184

View File

@ -321,8 +321,7 @@ public final class PurpleBot {
if (!reload) {
plugin.logInfo("Using default character set: " + Charset.defaultCharset());
}
} else {
if (Charset.isSupported(charSet)) {
} else if (Charset.isSupported(charSet)) {
if (!reload) {
plugin.logInfo("Using character set: " + charSet);
}
@ -334,7 +333,6 @@ public final class PurpleBot {
plugin.logInfo("Using default character set: " + Charset.defaultCharset());
}
}
}
if (!bindAddress.isEmpty()) {
if (!reload) {
plugin.logInfo("Binding to " + bindAddress);
@ -1730,6 +1728,10 @@ public final class PurpleBot {
if (!this.isConnected()) {
return;
}
if (message.isEmpty()) {
plugin.logDebug("gameDeath: blank death message for " + player.getDisplayName());
return;
}
for (String channelName : botChannels) {
if (isMessageEnabled(channelName, templateName)) {
if (isPlayerInValidWorld(player, channelName)) {
@ -3359,15 +3361,13 @@ public final class PurpleBot {
new IRCCommandSender(this, target, plugin, joinNoticeCtcp, "CONSOLE"),
new IRCConsoleCommandSender(this, target, plugin, joinNoticeCtcp, "CONSOLE"),
myMessage.trim().substring(1)));
} else {
if (joinNoticeCtcp) {
} else if (joinNoticeCtcp) {
asyncCTCPMessage(target, myMessage);
} else {
asyncIRCMessage(target, myMessage);
}
}
}
}
public void altNickChange() {
if (altNicks.isEmpty()) {