summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java')
-rw-r--r--EssentialsUpdate/src/f00f/net/irc/martyr/errors/NoSuchNickError.java47
1 files changed, 47 insertions, 0 deletions
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;
+ }
+
+}
+