mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-25 19:45:54 +01:00
Log error messages from IRC servers.
This commit is contained in:
parent
a039875685
commit
6be25284d1
@ -49,19 +49,16 @@ public class ServerResponseListener extends ListenerAdapter {
|
||||
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