mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-29 05:26:19 +01:00
Log error messages from IRC servers.
This commit is contained in:
parent
a039875685
commit
6be25284d1
@ -48,20 +48,17 @@ public class ServerResponseListener extends ListenerAdapter {
|
||||
@Override
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user