mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-18 04:21:23 +01:00
Tidy up the error replies.
This commit is contained in:
parent
6be25284d1
commit
7b797b2ef8
@ -48,17 +48,17 @@ public class ServerResponseListener extends ListenerAdapter {
|
||||
@Override
|
||||
public void onServerResponse(ServerResponseEvent event) {
|
||||
int serverReply = event.getCode();
|
||||
|
||||
|
||||
String rawMessage[] = event.getRawLine().split(" ", 5);
|
||||
String target = rawMessage[3];
|
||||
|
||||
if (serverReply == ReplyConstants.ERR_NICKNAMEINUSE) {
|
||||
plugin.logError("Nickname already in use.");
|
||||
plugin.logInfo("[" + target + "] Nick is 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.");
|
||||
plugin.logError("Cannot join " + target + " (Requires keyword)");
|
||||
} else if (serverReply >= 400 && serverReply <= 599) {
|
||||
plugin.logError(event.getRawLine());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user