Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Commit

Permalink
Log error messages from IRC servers.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnaude committed May 8, 2015
1 parent 130dd96 commit 9f5eef1
Showing 1 changed file with 7 additions and 11 deletions.
Expand Up @@ -49,20 +49,16 @@ public ServerResponseListener(PurpleIRC plugin, PurpleBot ircBot) {
public void onServerResponse(ServerResponseEvent event) {
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) {
plugin.logInfo("Nickname already in use.");
plugin.logError("Nickname already in use.");
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());

}
}

0 comments on commit 9f5eef1

Please sign in to comment.