Selaa lähdekoodia

Merge pull request #726 from csmith/master

Rename Command to BaseCommand.
pull/727/head
Greg Holmes 7 vuotta sitten
vanhempi
commit
a9a31eddcb
45 muutettua tiedostoa jossa 265 lisäystä ja 247 poistoa
  1. 2
    1
      src/main/java/com/dmdirc/commandparser/aliases/AliasCommandHandler.java
  2. 150
    0
      src/main/java/com/dmdirc/commandparser/commands/BaseCommand.java
  3. 4
    117
      src/main/java/com/dmdirc/commandparser/commands/Command.java
  4. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/channel/Ban.java
  5. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/channel/Cycle.java
  6. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/channel/Invite.java
  7. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/channel/KickReason.java
  8. 2
    3
      src/main/java/com/dmdirc/commandparser/commands/channel/Mode.java
  9. 2
    3
      src/main/java/com/dmdirc/commandparser/commands/channel/Names.java
  10. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/channel/Part.java
  11. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/channel/SetNickColour.java
  12. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/channel/ShowTopic.java
  13. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/chat/Me.java
  14. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/global/AliasCommand.java
  15. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/global/AllServers.java
  16. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/global/Clear.java
  17. 5
    6
      src/main/java/com/dmdirc/commandparser/commands/global/Echo.java
  18. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/global/Exit.java
  19. 4
    4
      src/main/java/com/dmdirc/commandparser/commands/global/Help.java
  20. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/global/Ifplugin.java
  21. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/global/LoadPlugin.java
  22. 4
    5
      src/main/java/com/dmdirc/commandparser/commands/global/NewServer.java
  23. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/global/OpenWindow.java
  24. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/global/ReloadIdentities.java
  25. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/global/ReloadPlugin.java
  26. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/global/SaveConfig.java
  27. 4
    5
      src/main/java/com/dmdirc/commandparser/commands/global/SetCommand.java
  28. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/global/UnloadPlugin.java
  29. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/AllChannels.java
  30. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Away.java
  31. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Back.java
  32. 3
    4
      src/main/java/com/dmdirc/commandparser/commands/server/ChangeServer.java
  33. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Ctcp.java
  34. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Disconnect.java
  35. 4
    5
      src/main/java/com/dmdirc/commandparser/commands/server/Ignore.java
  36. 6
    9
      src/main/java/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java
  37. 3
    5
      src/main/java/com/dmdirc/commandparser/commands/server/Message.java
  38. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Nick.java
  39. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Notice.java
  40. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/OpenQuery.java
  41. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Raw.java
  42. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/RawServerCommand.java
  43. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Reconnect.java
  44. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Umode.java
  45. 2
    2
      src/main/java/com/dmdirc/commandparser/commands/server/Whois.java

+ 2
- 1
src/main/java/com/dmdirc/commandparser/aliases/AliasCommandHandler.java Näytä tiedosto

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.commandparser.aliases;
24 24
 
25 25
 import com.dmdirc.commandparser.CommandArguments;
26
+import com.dmdirc.commandparser.commands.BaseCommand;
26 27
 import com.dmdirc.commandparser.commands.Command;
27 28
 import com.dmdirc.commandparser.commands.context.CommandContext;
28 29
 import com.dmdirc.interfaces.CommandController;
@@ -34,7 +35,7 @@ import javax.annotation.Nonnull;
34 35
 /**
35 36
  * {@link Command} implementation that handles an alias.
36 37
  */
37
-public class AliasCommandHandler extends Command {
38
+public class AliasCommandHandler extends BaseCommand {
38 39
 
39 40
     private final Alias alias;
40 41
 

+ 150
- 0
src/main/java/com/dmdirc/commandparser/commands/BaseCommand.java Näytä tiedosto

@@ -0,0 +1,150 @@
1
+/*
2
+ * Copyright (c) 2006-2015 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.commandparser.commands;
24
+
25
+import com.dmdirc.commandparser.CommandArguments;
26
+import com.dmdirc.commandparser.commands.context.CommandContext;
27
+import com.dmdirc.events.CommandErrorEvent;
28
+import com.dmdirc.events.CommandOutputEvent;
29
+import com.dmdirc.interfaces.CommandController;
30
+import com.dmdirc.interfaces.WindowModel;
31
+import com.dmdirc.ui.messages.IRCControlCodes;
32
+
33
+import javax.annotation.Nonnull;
34
+import javax.annotation.Nullable;
35
+
36
+/**
37
+ * Represents a generic command.
38
+ */
39
+public abstract class BaseCommand extends Command {
40
+
41
+    /** The controller this command is associated with. */
42
+    private final CommandController controller;
43
+
44
+    public BaseCommand(final CommandController controller) {
45
+        this.controller = controller;
46
+    }
47
+
48
+    protected CommandController getController() {
49
+        return controller;
50
+    }
51
+
52
+    /**
53
+     * Sends an output line, if appropriate, to the specified target.
54
+     *
55
+     * @param target   The command window to send the line to
56
+     * @param isSilent Whether this command is being silenced or not
57
+     * @param message  The output to send
58
+     */
59
+    protected final void showOutput(@Nullable final WindowModel target,
60
+            final boolean isSilent, final String message) {
61
+        if (!isSilent && target != null) {
62
+            target.getEventBus().publishAsync(new CommandOutputEvent(target, message));
63
+        }
64
+    }
65
+
66
+    /**
67
+     * Sends an error line, if appropriate, to the specified target.
68
+     *
69
+     * @param target   The command window to send the line to
70
+     * @param isSilent Whether this command is being silenced or not
71
+     * @param message  The error message to send
72
+     */
73
+    protected final void showError(@Nullable final WindowModel target,
74
+            final boolean isSilent, final String message) {
75
+        if (!isSilent && target != null) {
76
+            target.getEventBus().publishAsync(new CommandErrorEvent(target, message));
77
+        }
78
+    }
79
+
80
+    /**
81
+     * Sends a usage line, if appropriate, to the specified target.
82
+     *
83
+     * @param target   The command window to send the line to
84
+     * @param isSilent Whether this command is being silenced or not
85
+     * @param name     The name of the command that's raising the error
86
+     * @param args     The arguments that the command accepts or expects
87
+     */
88
+    protected final void showUsage(@Nullable final WindowModel target,
89
+            final boolean isSilent, final String name, final String args) {
90
+        if (!isSilent && target != null) {
91
+            target.getEventBus().publishAsync(new CommandErrorEvent(target,
92
+                    "Usage: " + controller.getCommandChar() + name + ' ' + args));
93
+        }
94
+    }
95
+
96
+    /**
97
+     * Formats the specified data into a table suitable for output in the textpane. It is expected
98
+     * that each String[] in data has the same number of elements as the headers array.
99
+     *
100
+     * @param headers The headers of the table.
101
+     * @param data    The contents of the table.
102
+     *
103
+     * @return A string containing an ASCII table
104
+     */
105
+    protected static String doTable(final String[] headers, final String[][] data) {
106
+        final StringBuilder res = new StringBuilder();
107
+        res.append(IRCControlCodes.FIXED);
108
+        res.append(IRCControlCodes.BOLD);
109
+
110
+        final int[] maxsizes = new int[headers.length];
111
+
112
+        for (int i = 0; i < headers.length; i++) {
113
+            maxsizes[i] = headers[i].length() + 3;
114
+
115
+            for (String[] row : data) {
116
+                maxsizes[i] = Math.max(maxsizes[i], row[i].length() + 3);
117
+            }
118
+
119
+            doPadding(res, headers[i], maxsizes[i]);
120
+        }
121
+
122
+        for (String[] source : data) {
123
+            res.append('\n');
124
+            res.append(IRCControlCodes.FIXED);
125
+
126
+            for (int i = 0; i < source.length; i++) {
127
+                doPadding(res, source[i], maxsizes[i]);
128
+            }
129
+        }
130
+
131
+        return res.toString();
132
+    }
133
+
134
+    /**
135
+     * Adds the specified data to the stringbuilder, padding with spaces to the specified size.
136
+     *
137
+     * @param builder The stringbuilder to append data to
138
+     * @param data    The data to be added
139
+     * @param size    The minimum size that should be used
140
+     */
141
+    private static void doPadding(final StringBuilder builder, final String data,
142
+            final int size) {
143
+        builder.append(data);
144
+
145
+        for (int i = 0; i < size - data.length(); i++) {
146
+            builder.append(' ');
147
+        }
148
+    }
149
+
150
+}

+ 4
- 117
src/main/java/com/dmdirc/commandparser/commands/Command.java Näytä tiedosto

@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2006-2015 DMDirc Developers
2
+ * Copyright (c) 2006-2016 DMDirc Developers
3 3
  *
4 4
  * Permission is hereby granted, free of charge, to any person obtaining a copy
5 5
  * of this software and associated documentation files (the "Software"), to deal
@@ -24,129 +24,16 @@ package com.dmdirc.commandparser.commands;
24 24
 
25 25
 import com.dmdirc.commandparser.CommandArguments;
26 26
 import com.dmdirc.commandparser.commands.context.CommandContext;
27
-import com.dmdirc.events.CommandErrorEvent;
28
-import com.dmdirc.events.CommandOutputEvent;
29
-import com.dmdirc.interfaces.CommandController;
30 27
 import com.dmdirc.interfaces.WindowModel;
31
-import com.dmdirc.ui.messages.IRCControlCodes;
32 28
 
33 29
 import javax.annotation.Nonnull;
34
-import javax.annotation.Nullable;
35 30
 
36 31
 /**
37
- * Represents a generic command.
32
+ * @deprecated Use {@link BaseCommand} directly.
38 33
  */
34
+@Deprecated
39 35
 public abstract class Command {
40 36
 
41
-    /** The controller this command is associated with. */
42
-    private final CommandController controller;
43
-
44
-    public Command(final CommandController controller) {
45
-        this.controller = controller;
46
-    }
47
-
48
-    protected CommandController getController() {
49
-        return controller;
50
-    }
51
-
52
-    /**
53
-     * Sends an output line, if appropriate, to the specified target.
54
-     *
55
-     * @param target   The command window to send the line to
56
-     * @param isSilent Whether this command is being silenced or not
57
-     * @param message  The output to send
58
-     */
59
-    protected final void showOutput(@Nullable final WindowModel target,
60
-            final boolean isSilent, final String message) {
61
-        if (!isSilent && target != null) {
62
-            target.getEventBus().publishAsync(new CommandOutputEvent(target, message));
63
-        }
64
-    }
65
-
66
-    /**
67
-     * Sends an error line, if appropriate, to the specified target.
68
-     *
69
-     * @param target   The command window to send the line to
70
-     * @param isSilent Whether this command is being silenced or not
71
-     * @param message  The error message to send
72
-     */
73
-    protected final void showError(@Nullable final WindowModel target,
74
-            final boolean isSilent, final String message) {
75
-        if (!isSilent && target != null) {
76
-            target.getEventBus().publishAsync(new CommandErrorEvent(target, message));
77
-        }
78
-    }
79
-
80
-    /**
81
-     * Sends a usage line, if appropriate, to the specified target.
82
-     *
83
-     * @param target   The command window to send the line to
84
-     * @param isSilent Whether this command is being silenced or not
85
-     * @param name     The name of the command that's raising the error
86
-     * @param args     The arguments that the command accepts or expects
87
-     */
88
-    protected final void showUsage(@Nullable final WindowModel target,
89
-            final boolean isSilent, final String name, final String args) {
90
-        if (!isSilent && target != null) {
91
-            target.getEventBus().publishAsync(new CommandErrorEvent(target,
92
-                    "Usage: " + controller.getCommandChar() + name + ' ' + args));
93
-        }
94
-    }
95
-
96
-    /**
97
-     * Formats the specified data into a table suitable for output in the textpane. It is expected
98
-     * that each String[] in data has the same number of elements as the headers array.
99
-     *
100
-     * @param headers The headers of the table.
101
-     * @param data    The contents of the table.
102
-     *
103
-     * @return A string containing an ASCII table
104
-     */
105
-    protected static String doTable(final String[] headers, final String[][] data) {
106
-        final StringBuilder res = new StringBuilder();
107
-        res.append(IRCControlCodes.FIXED);
108
-        res.append(IRCControlCodes.BOLD);
109
-
110
-        final int[] maxsizes = new int[headers.length];
111
-
112
-        for (int i = 0; i < headers.length; i++) {
113
-            maxsizes[i] = headers[i].length() + 3;
114
-
115
-            for (String[] row : data) {
116
-                maxsizes[i] = Math.max(maxsizes[i], row[i].length() + 3);
117
-            }
118
-
119
-            doPadding(res, headers[i], maxsizes[i]);
120
-        }
121
-
122
-        for (String[] source : data) {
123
-            res.append('\n');
124
-            res.append(IRCControlCodes.FIXED);
125
-
126
-            for (int i = 0; i < source.length; i++) {
127
-                doPadding(res, source[i], maxsizes[i]);
128
-            }
129
-        }
130
-
131
-        return res.toString();
132
-    }
133
-
134
-    /**
135
-     * Adds the specified data to the stringbuilder, padding with spaces to the specified size.
136
-     *
137
-     * @param builder The stringbuilder to append data to
138
-     * @param data    The data to be added
139
-     * @param size    The minimum size that should be used
140
-     */
141
-    private static void doPadding(final StringBuilder builder, final String data,
142
-            final int size) {
143
-        builder.append(data);
144
-
145
-        for (int i = 0; i < size - data.length(); i++) {
146
-            builder.append(' ');
147
-        }
148
-    }
149
-
150 37
     /**
151 38
      * Executes this command.
152 39
      *
@@ -157,6 +44,6 @@ public abstract class Command {
157 44
      * @since 0.6.4
158 45
      */
159 46
     public abstract void execute(@Nonnull WindowModel origin, CommandArguments args,
160
-            CommandContext context);
47
+                                 CommandContext context);
161 48
 
162 49
 }

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/channel/Ban.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -43,7 +43,7 @@ import javax.inject.Inject;
43 43
 /**
44 44
  * The kick command bans a specified user or host from the channel.
45 45
  */
46
-public class Ban extends Command implements IntelligentCommand {
46
+public class Ban extends BaseCommand implements IntelligentCommand {
47 47
 
48 48
     /** A command info object for this command. */
49 49
     public static final CommandInfo INFO = new BaseCommandInfo("ban",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/channel/Cycle.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -41,7 +41,7 @@ import javax.inject.Inject;
41 41
  * The cycle command allows users to rapidly part and rejoin a channel.
42 42
  */
43 43
 @CommandOptions(allowOffline = false)
44
-public class Cycle extends Command {
44
+public class Cycle extends BaseCommand {
45 45
 
46 46
     /** A command info object for this command. */
47 47
     public static final CommandInfo INFO = new BaseCommandInfo("cycle",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/channel/Invite.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.ExternalCommand;
32 32
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
@@ -45,7 +45,7 @@ import javax.inject.Inject;
45 45
  * @since 0.6.4
46 46
  */
47 47
 @CommandOptions(allowOffline = false)
48
-public class Invite extends Command implements ExternalCommand {
48
+public class Invite extends BaseCommand implements ExternalCommand {
49 49
 
50 50
     /** A command info object for this command. */
51 51
     public static final CommandInfo INFO = new BaseCommandInfo("invite",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/channel/KickReason.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
@@ -38,17 +38,16 @@ import com.dmdirc.interfaces.WindowModel;
38 38
 import com.dmdirc.ui.input.AdditionalTabTargets;
39 39
 import com.dmdirc.ui.input.TabCompletionType;
40 40
 
41
-import java.util.Optional;
42
-
43 41
 import javax.annotation.Nonnull;
44 42
 import javax.inject.Inject;
43
+import java.util.Optional;
45 44
 
46 45
 /**
47 46
  * The kick command kicks a specified user from the channel. This version allows the user to specify
48 47
  * a reason.
49 48
  */
50 49
 @CommandOptions(allowOffline = false)
51
-public class KickReason extends Command implements IntelligentCommand {
50
+public class KickReason extends BaseCommand implements IntelligentCommand {
52 51
 
53 52
     /** A command info object for this command. */
54 53
     public static final CommandInfo INFO = new BaseCommandInfo("kick",

+ 2
- 3
src/main/java/com/dmdirc/commandparser/commands/channel/Mode.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.ExternalCommand;
32 32
 import com.dmdirc.commandparser.commands.IntelligentCommand;
@@ -47,8 +47,7 @@ import javax.inject.Inject;
47 47
  * The mode command allows the user to inspect and change channel modes.
48 48
  */
49 49
 @CommandOptions(allowOffline = false)
50
-public class Mode extends Command implements IntelligentCommand,
51
-        ExternalCommand {
50
+public class Mode extends BaseCommand implements IntelligentCommand, ExternalCommand {
52 51
 
53 52
     /** A command info object for this command. */
54 53
     public static final CommandInfo INFO = new BaseCommandInfo("mode",

+ 2
- 3
src/main/java/com/dmdirc/commandparser/commands/channel/Names.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.ExternalCommand;
32 32
 import com.dmdirc.commandparser.commands.IntelligentCommand;
@@ -45,8 +45,7 @@ import javax.inject.Inject;
45 45
  * Sends a names request.
46 46
  */
47 47
 @CommandOptions(allowOffline = false)
48
-public class Names extends Command implements IntelligentCommand,
49
-        ExternalCommand {
48
+public class Names extends BaseCommand implements IntelligentCommand, ExternalCommand {
50 49
 
51 50
     /** A command info object for this command. */
52 51
     public static final CommandInfo INFO = new BaseCommandInfo("names",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/channel/Part.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -41,7 +41,7 @@ import javax.inject.Inject;
41 41
  * The part command parts the current channel with a specified part message.
42 42
  */
43 43
 @CommandOptions(allowOffline = false)
44
-public class Part extends Command {
44
+public class Part extends BaseCommand {
45 45
 
46 46
     /** A command info object for this command. */
47 47
     public static final CommandInfo INFO = new BaseCommandInfo("part",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/channel/SetNickColour.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -40,15 +40,14 @@ import com.dmdirc.ui.input.TabCompletionType;
40 40
 import com.dmdirc.ui.messages.ColourManagerFactory;
41 41
 import com.dmdirc.util.colours.Colour;
42 42
 
43
-import java.util.Optional;
44
-
45 43
 import javax.annotation.Nonnull;
46 44
 import javax.inject.Inject;
45
+import java.util.Optional;
47 46
 
48 47
 /**
49 48
  * Allows the user to set a nickname on the channel to use a custom colour.
50 49
  */
51
-public class SetNickColour extends Command implements IntelligentCommand {
50
+public class SetNickColour extends BaseCommand implements IntelligentCommand {
52 51
 
53 52
     /** A command info object for this command. */
54 53
     public static final CommandInfo INFO = new BaseCommandInfo("setnickcolour",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/channel/ShowTopic.java Näytä tiedosto

@@ -27,7 +27,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.CommandInfo;
29 29
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.commandparser.commands.Command;
30
+import com.dmdirc.commandparser.commands.BaseCommand;
31 31
 import com.dmdirc.commandparser.commands.CommandOptions;
32 32
 import com.dmdirc.commandparser.commands.ExternalCommand;
33 33
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
@@ -41,16 +41,15 @@ import com.dmdirc.interfaces.GroupChatUser;
41 41
 import com.dmdirc.interfaces.User;
42 42
 import com.dmdirc.interfaces.WindowModel;
43 43
 
44
-import java.util.Optional;
45
-
46 44
 import javax.annotation.Nonnull;
47 45
 import javax.inject.Inject;
46
+import java.util.Optional;
48 47
 
49 48
 /**
50 49
  * The show topic command shows the user the current topic.
51 50
  */
52 51
 @CommandOptions(allowOffline = false)
53
-public class ShowTopic extends Command implements ExternalCommand {
52
+public class ShowTopic extends BaseCommand implements ExternalCommand {
54 53
 
55 54
     /** A command info object for this command. */
56 55
     public static final CommandInfo INFO = new BaseCommandInfo("topic",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/chat/Me.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.ValidatingCommand;
31 31
 import com.dmdirc.commandparser.commands.context.ChatCommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -42,7 +42,7 @@ import javax.inject.Inject;
42 42
 /**
43 43
  * The me command sends a CTCP action to the current channel.
44 44
  */
45
-public class Me extends Command implements ValidatingCommand {
45
+public class Me extends BaseCommand implements ValidatingCommand {
46 46
 
47 47
     /** A command info object for this command. */
48 48
     public static final CommandInfo INFO = new BaseCommandInfo("me",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/global/AliasCommand.java Näytä tiedosto

@@ -29,7 +29,7 @@ import com.dmdirc.commandparser.CommandType;
29 29
 import com.dmdirc.commandparser.aliases.Alias;
30 30
 import com.dmdirc.commandparser.aliases.AliasFactory;
31 31
 import com.dmdirc.commandparser.aliases.AliasManager;
32
-import com.dmdirc.commandparser.commands.Command;
32
+import com.dmdirc.commandparser.commands.BaseCommand;
33 33
 import com.dmdirc.commandparser.commands.IntelligentCommand;
34 34
 import com.dmdirc.commandparser.commands.context.CommandContext;
35 35
 import com.dmdirc.interfaces.CommandController;
@@ -37,15 +37,14 @@ import com.dmdirc.interfaces.WindowModel;
37 37
 import com.dmdirc.ui.input.AdditionalTabTargets;
38 38
 import com.dmdirc.ui.input.TabCompleterUtils;
39 39
 
40
-import java.util.Optional;
41
-
42 40
 import javax.annotation.Nonnull;
43 41
 import javax.inject.Inject;
42
+import java.util.Optional;
44 43
 
45 44
 /**
46 45
  * The alias command allows users to create aliases on-the-fly.
47 46
  */
48
-public class AliasCommand extends Command implements IntelligentCommand {
47
+public class AliasCommand extends BaseCommand implements IntelligentCommand {
49 48
 
50 49
     /** A command info object for this command. */
51 50
     public static final CommandInfo INFO = new BaseCommandInfo("alias",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/global/AllServers.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -43,7 +43,7 @@ import javax.inject.Inject;
43 43
 /**
44 44
  * The AllServers command allows users to issue commands to all servers.
45 45
  */
46
-public class AllServers extends Command implements IntelligentCommand {
46
+public class AllServers extends BaseCommand implements IntelligentCommand {
47 47
 
48 48
     /** A command info object for this command. */
49 49
     public static final CommandInfo INFO = new BaseCommandInfo("allservers",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/global/Clear.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -39,7 +39,7 @@ import javax.inject.Inject;
39 39
 /**
40 40
  * The clear command clears the main text area of the current window.
41 41
  */
42
-public class Clear extends Command implements IntelligentCommand {
42
+public class Clear extends BaseCommand implements IntelligentCommand {
43 43
 
44 44
     /** A command info object for this command. */
45 45
     public static final CommandInfo INFO = new BaseCommandInfo("clear",

+ 5
- 6
src/main/java/com/dmdirc/commandparser/commands/global/Echo.java Näytä tiedosto

@@ -27,7 +27,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.CommandInfo;
29 29
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.commandparser.commands.Command;
30
+import com.dmdirc.commandparser.commands.BaseCommand;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
33 33
 import com.dmdirc.commandparser.commands.flags.CommandFlag;
@@ -40,6 +40,9 @@ import com.dmdirc.interfaces.WindowModel;
40 40
 import com.dmdirc.ui.WindowManager;
41 41
 import com.dmdirc.ui.input.AdditionalTabTargets;
42 42
 
43
+import javax.annotation.Nonnull;
44
+import javax.annotation.Nullable;
45
+import javax.inject.Inject;
43 46
 import java.time.LocalDateTime;
44 47
 import java.time.ZoneId;
45 48
 import java.util.ArrayList;
@@ -48,14 +51,10 @@ import java.util.Date;
48 51
 import java.util.Optional;
49 52
 import java.util.stream.Collectors;
50 53
 
51
-import javax.annotation.Nonnull;
52
-import javax.annotation.Nullable;
53
-import javax.inject.Inject;
54
-
55 54
 /**
56 55
  * The echo commands simply echos text to the current window.
57 56
  */
58
-public class Echo extends Command implements IntelligentCommand {
57
+public class Echo extends BaseCommand implements IntelligentCommand {
59 58
 
60 59
     /** A command info object for this command. */
61 60
     public static final CommandInfo INFO = new BaseCommandInfo("echo",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/global/Exit.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.interfaces.CommandController;
32 32
 import com.dmdirc.interfaces.LifecycleController;
@@ -39,7 +39,7 @@ import javax.inject.Inject;
39 39
  * The exit command allows the user to quit DMDirc with a custom quit message. When the client
40 40
  * quits, it disconnects all servers (with the quit message supplied) and saves the config file.
41 41
  */
42
-public class Exit extends Command {
42
+public class Exit extends BaseCommand {
43 43
 
44 44
     /** A command info object for this command. */
45 45
     public static final CommandInfo INFO = new BaseCommandInfo("exit",

+ 4
- 4
src/main/java/com/dmdirc/commandparser/commands/global/Help.java Näytä tiedosto

@@ -26,6 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
29 30
 import com.dmdirc.commandparser.commands.Command;
30 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -35,20 +36,19 @@ import com.dmdirc.ui.input.AdditionalTabTargets;
35 36
 import com.dmdirc.ui.input.TabCompletionType;
36 37
 import com.dmdirc.ui.messages.IRCControlCodes;
37 38
 
39
+import javax.annotation.Nonnull;
40
+import javax.inject.Inject;
38 41
 import java.util.ArrayList;
39 42
 import java.util.Collections;
40 43
 import java.util.List;
41 44
 import java.util.Map;
42 45
 
43
-import javax.annotation.Nonnull;
44
-import javax.inject.Inject;
45
-
46 46
 /**
47 47
  * The help command shows the user a list of available commands, along with their arguments, and a
48 48
  * description. It is context-aware, so channel commands are only displayed when in a channel
49 49
  * window, for example.
50 50
  */
51
-public class Help extends Command implements IntelligentCommand {
51
+public class Help extends BaseCommand implements IntelligentCommand {
52 52
 
53 53
     /** A command info object for this command. */
54 54
     public static final CommandInfo INFO = new BaseCommandInfo("help",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/global/Ifplugin.java Näytä tiedosto

@@ -27,7 +27,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.CommandInfo;
29 29
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.commandparser.commands.Command;
30
+import com.dmdirc.commandparser.commands.BaseCommand;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
33 33
 import com.dmdirc.commandparser.parsers.CommandParser;
@@ -40,17 +40,16 @@ import com.dmdirc.plugins.PluginManager;
40 40
 import com.dmdirc.ui.input.AdditionalTabTargets;
41 41
 import com.dmdirc.ui.input.TabCompleterUtils;
42 42
 
43
-import java.util.Optional;
44
-
45 43
 import javax.annotation.Nonnull;
46 44
 import javax.inject.Inject;
47 45
 import javax.inject.Provider;
46
+import java.util.Optional;
48 47
 
49 48
 /**
50 49
  * The if plugin command allows the user to execute commands based on whether or not a plugin is
51 50
  * loaded.
52 51
  */
53
-public class Ifplugin extends Command implements IntelligentCommand {
52
+public class Ifplugin extends BaseCommand implements IntelligentCommand {
54 53
 
55 54
     /** A command info object for this command. */
56 55
     public static final CommandInfo INFO = new BaseCommandInfo("ifplugin",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/global/LoadPlugin.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -36,15 +36,14 @@ import com.dmdirc.plugins.PluginManager;
36 36
 import com.dmdirc.plugins.PluginMetaData;
37 37
 import com.dmdirc.ui.input.AdditionalTabTargets;
38 38
 
39
-import java.util.stream.Collectors;
40
-
41 39
 import javax.annotation.Nonnull;
42 40
 import javax.inject.Inject;
41
+import java.util.stream.Collectors;
43 42
 
44 43
 /**
45 44
  * Allows the user to load a plugin.
46 45
  */
47
-public class LoadPlugin extends Command implements IntelligentCommand {
46
+public class LoadPlugin extends BaseCommand implements IntelligentCommand {
48 47
 
49 48
     /** A command info object for this command. */
50 49
     public static final CommandInfo INFO = new BaseCommandInfo("loadplugin",

+ 4
- 5
src/main/java/com/dmdirc/commandparser/commands/global/NewServer.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.config.profiles.ProfileManager;
@@ -40,16 +40,15 @@ import com.dmdirc.ui.input.AdditionalTabTargets;
40 40
 import com.dmdirc.util.InvalidURIException;
41 41
 import com.dmdirc.util.URIParser;
42 42
 
43
-import java.net.URI;
44
-import java.util.stream.Collectors;
45
-
46 43
 import javax.annotation.Nonnull;
47 44
 import javax.inject.Inject;
45
+import java.net.URI;
46
+import java.util.stream.Collectors;
48 47
 
49 48
 /**
50 49
  * The new server command allows users to open a new server window.
51 50
  */
52
-public class NewServer extends Command implements IntelligentCommand {
51
+public class NewServer extends BaseCommand implements IntelligentCommand {
53 52
 
54 53
     /** A command info object for this command. */
55 54
     public static final CommandInfo INFO = new BaseCommandInfo("newserver",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/global/OpenWindow.java Näytä tiedosto

@@ -27,7 +27,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.CommandInfo;
29 29
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.commandparser.commands.Command;
30
+import com.dmdirc.commandparser.commands.BaseCommand;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
33 33
 import com.dmdirc.config.GlobalConfig;
@@ -47,7 +47,7 @@ import java.util.Optional;
47 47
 /**
48 48
  * Opens a new window.
49 49
  */
50
-public class OpenWindow extends Command implements IntelligentCommand {
50
+public class OpenWindow extends BaseCommand implements IntelligentCommand {
51 51
 
52 52
     /** A command info object for this command. */
53 53
     public static final CommandInfo INFO = new BaseCommandInfo("openwindow",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/global/ReloadIdentities.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -40,7 +40,7 @@ import javax.inject.Inject;
40 40
 /**
41 41
  * Allows the user to reload identities.
42 42
  */
43
-public class ReloadIdentities extends Command implements IntelligentCommand {
43
+public class ReloadIdentities extends BaseCommand implements IntelligentCommand {
44 44
 
45 45
     /** A command info object for this command. */
46 46
     public static final CommandInfo INFO = new BaseCommandInfo("reloadidentities",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/global/ReloadPlugin.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -35,15 +35,14 @@ import com.dmdirc.plugins.PluginInfo;
35 35
 import com.dmdirc.plugins.PluginManager;
36 36
 import com.dmdirc.ui.input.AdditionalTabTargets;
37 37
 
38
-import java.util.stream.Collectors;
39
-
40 38
 import javax.annotation.Nonnull;
41 39
 import javax.inject.Inject;
40
+import java.util.stream.Collectors;
42 41
 
43 42
 /**
44 43
  * Allows the user to reload a plugin.
45 44
  */
46
-public class ReloadPlugin extends Command implements IntelligentCommand {
45
+public class ReloadPlugin extends BaseCommand implements IntelligentCommand {
47 46
 
48 47
     /** A command info object for this command. */
49 48
     public static final CommandInfo INFO = new BaseCommandInfo("reloadplugin",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/global/SaveConfig.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -40,7 +40,7 @@ import javax.inject.Inject;
40 40
 /**
41 41
  * Allows the user to save the config file.
42 42
  */
43
-public final class SaveConfig extends Command implements IntelligentCommand {
43
+public final class SaveConfig extends BaseCommand implements IntelligentCommand {
44 44
 
45 45
     /** A command info object for this command. */
46 46
     public static final CommandInfo INFO = new BaseCommandInfo("saveconfig",

+ 4
- 5
src/main/java/com/dmdirc/commandparser/commands/global/SetCommand.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -44,17 +44,16 @@ import com.dmdirc.interfaces.config.IdentityFactory;
44 44
 import com.dmdirc.interfaces.config.ReadOnlyConfigProvider;
45 45
 import com.dmdirc.ui.input.AdditionalTabTargets;
46 46
 
47
-import java.util.List;
48
-import java.util.Optional;
49
-
50 47
 import javax.annotation.Nonnull;
51 48
 import javax.annotation.Nullable;
52 49
 import javax.inject.Inject;
50
+import java.util.List;
51
+import java.util.Optional;
53 52
 
54 53
 /**
55 54
  * The set command allows the user to inspect and change global config settings.
56 55
  */
57
-public class SetCommand extends Command implements IntelligentCommand {
56
+public class SetCommand extends BaseCommand implements IntelligentCommand {
58 57
 
59 58
     /** A command info object for this command. */
60 59
     public static final CommandInfo INFO = new BaseCommandInfo("set",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/global/UnloadPlugin.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -35,15 +35,14 @@ import com.dmdirc.plugins.PluginInfo;
35 35
 import com.dmdirc.plugins.PluginManager;
36 36
 import com.dmdirc.ui.input.AdditionalTabTargets;
37 37
 
38
-import java.util.stream.Collectors;
39
-
40 38
 import javax.annotation.Nonnull;
41 39
 import javax.inject.Inject;
40
+import java.util.stream.Collectors;
42 41
 
43 42
 /**
44 43
  * Allows the user to unload a plugin.
45 44
  */
46
-public class UnloadPlugin extends Command implements IntelligentCommand {
45
+public class UnloadPlugin extends BaseCommand implements IntelligentCommand {
47 46
 
48 47
     /** A command info object for this command. */
49 48
     public static final CommandInfo INFO = new BaseCommandInfo("unloadplugin",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/AllChannels.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -44,7 +44,7 @@ import javax.inject.Inject;
44 44
 /**
45 45
  * The AllChannels command allows the user to issue a command to all channels on a server.
46 46
  */
47
-public class AllChannels extends Command implements IntelligentCommand {
47
+public class AllChannels extends BaseCommand implements IntelligentCommand {
48 48
 
49 49
     /** A command info object for this command. */
50 50
     public static final CommandInfo INFO = new BaseCommandInfo("allchannels",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Away.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -41,7 +41,7 @@ import javax.inject.Inject;
41 41
  * The away command allows the user to set their away message.
42 42
  */
43 43
 @CommandOptions(allowOffline = false)
44
-public class Away extends Command {
44
+public class Away extends BaseCommand {
45 45
 
46 46
     /** A command info object for this command. */
47 47
     public static final CommandInfo INFO = new BaseCommandInfo("away",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Back.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -43,7 +43,7 @@ import javax.inject.Inject;
43 43
  * The back command allows the user to unset their away status.
44 44
  */
45 45
 @CommandOptions(allowOffline = false)
46
-public class Back extends Command implements IntelligentCommand {
46
+public class Back extends BaseCommand implements IntelligentCommand {
47 47
 
48 48
     /** A command info object for this command. */
49 49
     public static final CommandInfo INFO = new BaseCommandInfo("back",

+ 3
- 4
src/main/java/com/dmdirc/commandparser/commands/server/ChangeServer.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
32 32
 import com.dmdirc.events.CommandErrorEvent;
@@ -36,15 +36,14 @@ import com.dmdirc.interfaces.WindowModel;
36 36
 import com.dmdirc.util.InvalidURIException;
37 37
 import com.dmdirc.util.URIParser;
38 38
 
39
-import java.net.URI;
40
-
41 39
 import javax.annotation.Nonnull;
42 40
 import javax.inject.Inject;
41
+import java.net.URI;
43 42
 
44 43
 /**
45 44
  * The /server command allows the user to connect to a new server.
46 45
  */
47
-public class ChangeServer extends Command {
46
+public class ChangeServer extends BaseCommand {
48 47
 
49 48
     /** A command info object for this command. */
50 49
     public static final CommandInfo INFO = new BaseCommandInfo("server",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Ctcp.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -45,7 +45,7 @@ import javax.inject.Inject;
45 45
  * Allows the user to send CTCP messages.
46 46
  */
47 47
 @CommandOptions(allowOffline = false)
48
-public class Ctcp extends Command implements IntelligentCommand {
48
+public class Ctcp extends BaseCommand implements IntelligentCommand {
49 49
 
50 50
     /** A command info object for this command. */
51 51
     public static final CommandInfo INFO = new BaseCommandInfo("ctcp",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Disconnect.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -39,7 +39,7 @@ import javax.inject.Inject;
39 39
 /**
40 40
  * The disconnect command disconnects from the current server.
41 41
  */
42
-public class Disconnect extends Command {
42
+public class Disconnect extends BaseCommand {
43 43
 
44 44
     /** A command info object for this command. */
45 45
     public static final CommandInfo INFO = new BaseCommandInfo("disconnect",

+ 4
- 5
src/main/java/com/dmdirc/commandparser/commands/server/Ignore.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -37,18 +37,17 @@ import com.dmdirc.parser.common.IgnoreList;
37 37
 import com.dmdirc.ui.input.AdditionalTabTargets;
38 38
 import com.dmdirc.ui.input.TabCompletionType;
39 39
 
40
+import javax.annotation.Nonnull;
41
+import javax.inject.Inject;
40 42
 import java.util.List;
41 43
 import java.util.regex.Pattern;
42 44
 import java.util.regex.PatternSyntaxException;
43 45
 import java.util.stream.Collectors;
44 46
 
45
-import javax.annotation.Nonnull;
46
-import javax.inject.Inject;
47
-
48 47
 /**
49 48
  * Allows the user to add/view/delete ignores.
50 49
  */
51
-public class Ignore extends Command implements IntelligentCommand {
50
+public class Ignore extends BaseCommand implements IntelligentCommand {
52 51
 
53 52
     /** A command info object for this command. */
54 53
     public static final CommandInfo INFO = new BaseCommandInfo("ignore",

+ 6
- 9
src/main/java/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -39,27 +39,24 @@ import com.dmdirc.parser.common.ChannelJoinRequest;
39 39
 import com.dmdirc.ui.WindowManager;
40 40
 import com.dmdirc.ui.input.AdditionalTabTargets;
41 41
 import com.dmdirc.ui.messages.Styliser;
42
-
43 42
 import com.google.common.collect.ArrayListMultimap;
44 43
 import com.google.common.collect.Multimap;
44
+import net.engio.mbassy.listener.Handler;
45 45
 
46
+import javax.annotation.Nonnull;
47
+import javax.annotation.concurrent.GuardedBy;
48
+import javax.inject.Inject;
46 49
 import java.util.ArrayList;
47 50
 import java.util.List;
48 51
 import java.util.Optional;
49 52
 import java.util.stream.Collectors;
50 53
 
51
-import javax.annotation.Nonnull;
52
-import javax.annotation.concurrent.GuardedBy;
53
-import javax.inject.Inject;
54
-
55
-import net.engio.mbassy.listener.Handler;
56
-
57 54
 /**
58 55
  * Allows the user to join channels.
59 56
  *
60 57
  * @since 0.6.3m1
61 58
  */
62
-public class JoinChannelCommand extends Command implements IntelligentCommand {
59
+public class JoinChannelCommand extends BaseCommand implements IntelligentCommand {
63 60
 
64 61
     /** A command info object for this command. */
65 62
     public static final CommandInfo INFO = new BaseCommandInfo("join",

+ 3
- 5
src/main/java/com/dmdirc/commandparser/commands/server/Message.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.WrappableCommand;
@@ -41,17 +41,15 @@ import com.dmdirc.parser.interfaces.Parser;
41 41
 import com.dmdirc.ui.input.AdditionalTabTargets;
42 42
 import com.dmdirc.ui.input.TabCompletionType;
43 43
 
44
-import java.util.Optional;
45
-
46 44
 import javax.annotation.Nonnull;
47 45
 import javax.inject.Inject;
46
+import java.util.Optional;
48 47
 
49 48
 /**
50 49
  * Allows the user to send privmsgs.
51 50
  */
52 51
 @CommandOptions(allowOffline = false)
53
-public class Message extends Command implements IntelligentCommand,
54
-        WrappableCommand {
52
+public class Message extends BaseCommand implements IntelligentCommand, WrappableCommand {
55 53
 
56 54
     /** A command info object for this command. */
57 55
     public static final CommandInfo INFO = new BaseCommandInfo("msg",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Nick.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -44,7 +44,7 @@ import javax.inject.Inject;
44 44
  * Allows the user to change nickname.
45 45
  */
46 46
 @CommandOptions(allowOffline = false)
47
-public class Nick extends Command implements IntelligentCommand {
47
+public class Nick extends BaseCommand implements IntelligentCommand {
48 48
 
49 49
     /** A command info object for this command. */
50 50
     public static final CommandInfo INFO = new BaseCommandInfo("nick",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Notice.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
@@ -45,7 +45,7 @@ import javax.inject.Inject;
45 45
  * Allows the user to send notices.
46 46
  */
47 47
 @CommandOptions(allowOffline = false)
48
-public class Notice extends Command implements IntelligentCommand {
48
+public class Notice extends BaseCommand implements IntelligentCommand {
49 49
 
50 50
     /** A command info object for this command. */
51 51
     public static final CommandInfo INFO = new BaseCommandInfo("notice",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/OpenQuery.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.WrappableCommand;
@@ -47,7 +47,7 @@ import javax.inject.Inject;
47 47
  * Allows the user to open a query dialog with another user.
48 48
  */
49 49
 @CommandOptions(allowOffline = false)
50
-public class OpenQuery extends Command implements IntelligentCommand,
50
+public class OpenQuery extends BaseCommand implements IntelligentCommand,
51 51
         WrappableCommand {
52 52
 
53 53
     /** A command info object for this command. */

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Raw.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.CommandOptions;
31 31
 import com.dmdirc.commandparser.commands.context.CommandContext;
32 32
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -42,7 +42,7 @@ import javax.inject.Inject;
42 42
  * The raw command allows the user to send a raw line of text directly to the irc server.
43 43
  */
44 44
 @CommandOptions(allowOffline = false)
45
-public class Raw extends Command {
45
+public class Raw extends BaseCommand {
46 46
 
47 47
     /** A command info object for this command. */
48 48
     public static final CommandInfo INFO = new BaseCommandInfo("raw",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/RawServerCommand.java Näytä tiedosto

@@ -25,7 +25,7 @@ package com.dmdirc.commandparser.commands.server;
25 25
 import com.dmdirc.commandparser.CommandArguments;
26 26
 import com.dmdirc.commandparser.CommandInfo;
27 27
 import com.dmdirc.commandparser.CommandType;
28
-import com.dmdirc.commandparser.commands.Command;
28
+import com.dmdirc.commandparser.commands.BaseCommand;
29 29
 import com.dmdirc.commandparser.commands.CommandOptions;
30 30
 import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -39,7 +39,7 @@ import javax.annotation.Nonnull;
39 39
  * Implements a raw server command (i.e., a command that is sent to the server as-is.
40 40
  */
41 41
 @CommandOptions(allowOffline = false)
42
-public class RawServerCommand extends Command implements CommandInfo {
42
+public class RawServerCommand extends BaseCommand implements CommandInfo {
43 43
 
44 44
     /** The name of this raw command. */
45 45
     private final String myName;

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Reconnect.java Näytä tiedosto

@@ -26,7 +26,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
26 26
 import com.dmdirc.commandparser.CommandArguments;
27 27
 import com.dmdirc.commandparser.CommandInfo;
28 28
 import com.dmdirc.commandparser.CommandType;
29
-import com.dmdirc.commandparser.commands.Command;
29
+import com.dmdirc.commandparser.commands.BaseCommand;
30 30
 import com.dmdirc.commandparser.commands.context.CommandContext;
31 31
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
32 32
 import com.dmdirc.interfaces.CommandController;
@@ -39,7 +39,7 @@ import javax.inject.Inject;
39 39
 /**
40 40
  * The reconnect command reconnects to the current server.
41 41
  */
42
-public class Reconnect extends Command {
42
+public class Reconnect extends BaseCommand {
43 43
 
44 44
     /** A command info object for this command. */
45 45
     public static final CommandInfo INFO = new BaseCommandInfo("reconnect",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Umode.java Näytä tiedosto

@@ -27,7 +27,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.CommandInfo;
29 29
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.commandparser.commands.Command;
30
+import com.dmdirc.commandparser.commands.BaseCommand;
31 31
 import com.dmdirc.commandparser.commands.CommandOptions;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
33 33
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -42,7 +42,7 @@ import javax.inject.Inject;
42 42
  * Allows the user to change user modes.
43 43
  */
44 44
 @CommandOptions(allowOffline = false)
45
-public class Umode extends Command {
45
+public class Umode extends BaseCommand {
46 46
 
47 47
     /** A command info object for this command. */
48 48
     public static final CommandInfo INFO = new BaseCommandInfo("umode",

+ 2
- 2
src/main/java/com/dmdirc/commandparser/commands/server/Whois.java Näytä tiedosto

@@ -27,7 +27,7 @@ import com.dmdirc.commandparser.BaseCommandInfo;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.CommandInfo;
29 29
 import com.dmdirc.commandparser.CommandType;
30
-import com.dmdirc.commandparser.commands.Command;
30
+import com.dmdirc.commandparser.commands.BaseCommand;
31 31
 import com.dmdirc.commandparser.commands.CommandOptions;
32 32
 import com.dmdirc.commandparser.commands.context.CommandContext;
33 33
 import com.dmdirc.commandparser.commands.context.ServerCommandContext;
@@ -42,7 +42,7 @@ import javax.inject.Inject;
42 42
  * Requests information about another user on the server.
43 43
  */
44 44
 @CommandOptions(allowOffline = false)
45
-public class Whois extends Command {
45
+public class Whois extends BaseCommand {
46 46
 
47 47
     /** A command info object for this command. */
48 48
     public static final CommandInfo INFO = new BaseCommandInfo("whois",

Loading…
Peruuta
Tallenna