From 860d446d28776ec842fa53e8e08538d4e093d6e9 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 12 Oct 2011 03:14:07 +0200 Subject: EssentialsUpdate WIP --- .../net/irc/martyr/errors/NoSuchNickError.java | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java (limited to 'EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java') diff --git a/EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java b/EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java new file mode 100644 index 000000000..664a2c9d0 --- /dev/null +++ b/EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java @@ -0,0 +1,47 @@ +package f00f.net.irc.martyr.errors; + +import f00f.net.irc.martyr.InCommand; +import f00f.net.irc.martyr.util.FullNick; + +/** + * Code: 401 ERR_NOSUCHNICK + * <nickname> :No such nick/channel + * Used to indicated the nickname parameter supplied to a command is currently unused. + */ +public class NoSuchNickError extends GenericError +{ + private FullNick nick; + private String errorMessage; + + public NoSuchNickError() + { + } + + public NoSuchNickError(FullNick nick, String errorMessage) + { + this.nick = nick; + this.errorMessage = errorMessage; + } + + public String getIrcIdentifier() + { + return "401"; + } + + public InCommand parse( String prefix, String identifier, String params ) + { + return new NoSuchNickError(new FullNick(getParameter(params, 1)), getParameter(params, 2)); + } + + public FullNick getNick() + { + return nick; + } + + public String getErrorMessage() + { + return errorMessage; + } + +} + -- cgit v1.2.3