Log error messages from IRC servers.

This commit is contained in:
cnaude 2015-05-08 09:43:09 -07:00
parent a039875685
commit 6be25284d1

View File

@ -49,19 +49,16 @@ public class ServerResponseListener extends ListenerAdapter {
public void onServerResponse(ServerResponseEvent event) { public void onServerResponse(ServerResponseEvent event) {
int serverReply = event.getCode(); int serverReply = event.getCode();
if (serverReply == ReplyConstants.ERR_BADCHANNELKEY) {
plugin.logInfo("Bad channel password.");
}
if (serverReply == ReplyConstants.ERR_BANNEDFROMCHAN) {
plugin.logInfo("Banned from the channel.");
}
if (serverReply == ReplyConstants.ERR_NICKNAMEINUSE) { if (serverReply == ReplyConstants.ERR_NICKNAMEINUSE) {
plugin.logInfo("Nickname already in use."); plugin.logError("Nickname already in use.");
ircBot.altNickChange(); ircBot.altNickChange();
} else if (serverReply == ReplyConstants.ERR_BADCHANNELKEY) {
plugin.logError("Bad channel password.");
} else if (serverReply == ReplyConstants.ERR_BANNEDFROMCHAN) {
plugin.logError("Banned from the channel.");
} else if (serverReply >= 400 && serverReply <= 599) {
plugin.logError(event.getRawLine());
} }
//plugin.logDebug("Server response: " + event.getRawLine());
} }
} }