Browse Source

Fix fallout from command changes

Change-Id: I8d60d7dd048915a173a9c566a58260ac4cb8f1db
Reviewed-on: http://gerrit.dmdirc.com/1117
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4
Chris Smith 14 years ago
parent
commit
03ef0bc895

+ 2
- 1
src/com/dmdirc/addons/audio/AudioCommand.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.audio;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
@@ -46,7 +47,7 @@ public final class AudioCommand extends GlobalCommand {
46 47
 
47 48
     /** {@inheritDoc} */
48 49
     @Override
49
-    public void execute(final InputWindow origin, final boolean isSilent,
50
+    public void execute(final FrameContainer origin, final boolean isSilent,
50 51
                         final CommandArguments args) {
51 52
         final String filename = args.getArgumentsAsString();
52 53
         final File file = new File(filename);

+ 2
- 2
src/com/dmdirc/addons/audio/BeepCommand.java View File

@@ -22,10 +22,10 @@
22 22
 
23 23
 package com.dmdirc.addons.audio;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28
-import com.dmdirc.ui.interfaces.InputWindow;
29 29
 
30 30
 import java.awt.Toolkit;
31 31
 
@@ -46,7 +46,7 @@ public final class BeepCommand extends GlobalCommand {
46 46
 
47 47
     /** {@inheritDoc} */
48 48
     @Override
49
-    public void execute(final InputWindow origin, final boolean isSilent,
49
+    public void execute(final FrameContainer origin, final boolean isSilent,
50 50
                         final CommandArguments args) {
51 51
         Toolkit.getDefaultToolkit().beep();
52 52
     }

+ 3
- 2
src/com/dmdirc/addons/calc/CalcCommand.java View File

@@ -22,9 +22,10 @@
22 22
 
23 23
 package com.dmdirc.addons.calc;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.commands.GlobalCommand;
27
-import com.dmdirc.ui.interfaces.InputWindow;
28
+
28 29
 import java.text.ParseException;
29 30
 
30 31
 /**
@@ -37,7 +38,7 @@ public class CalcCommand extends GlobalCommand {
37 38
 
38 39
     /** {@inheritDoc} */
39 40
     @Override
40
-    public void execute(final InputWindow origin, final boolean isSilent,
41
+    public void execute(final FrameContainer origin, final boolean isSilent,
41 42
             final CommandArguments args) {
42 43
         try {
43 44
             int offset = 0;

+ 3
- 3
src/com/dmdirc/addons/dcc/DCCCommand.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.dcc;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Main;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.actions.ActionManager;
@@ -35,7 +36,6 @@ import com.dmdirc.config.IdentityManager;
35 36
 import com.dmdirc.parser.interfaces.Parser;
36 37
 import com.dmdirc.ui.input.AdditionalTabTargets;
37 38
 import com.dmdirc.ui.input.TabCompletionType;
38
-import com.dmdirc.ui.interfaces.InputWindow;
39 39
 
40 40
 import java.io.File;
41 41
 
@@ -66,7 +66,7 @@ public final class DCCCommand extends ServerCommand implements IntelligentComman
66 66
 
67 67
     /** {@inheritDoc} */
68 68
     @Override
69
-    public void execute(final InputWindow origin, final Server server,
69
+    public void execute(final FrameContainer origin, final Server server,
70 70
             final boolean isSilent, final CommandArguments args) {
71 71
         if (args.getArguments().length > 1) {
72 72
             final String type = args.getArguments()[0];
@@ -136,7 +136,7 @@ public final class DCCCommand extends ServerCommand implements IntelligentComman
136 136
      * @param filename The file to send
137 137
      * @since 0.6.3m1
138 138
      */
139
-    public void sendFile(final String target, final InputWindow origin,
139
+    public void sendFile(final String target, final FrameContainer origin,
140 140
             final Server server, final boolean isSilent, final String filename) {
141 141
         // New thread to ask the user what file to send
142 142
         final File givenFile = new File(filename);

+ 6
- 4
src/com/dmdirc/addons/dcc/DCCCommandParser.java View File

@@ -22,13 +22,14 @@
22 22
 
23 23
 package com.dmdirc.addons.dcc;
24 24
 
25
+import com.dmdirc.FrameContainer;
26
+import com.dmdirc.WritableFrameContainer;
25 27
 import com.dmdirc.commandparser.CommandArguments;
26 28
 import com.dmdirc.commandparser.CommandManager;
27 29
 import com.dmdirc.commandparser.CommandType;
28 30
 import com.dmdirc.commandparser.commands.Command;
29 31
 import com.dmdirc.commandparser.commands.GlobalCommand;
30 32
 import com.dmdirc.commandparser.parsers.CommandParser;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 33
 
33 34
 /**
34 35
  * DCC CommandParser
@@ -76,7 +77,8 @@ public class DCCCommandParser extends CommandParser {
76 77
      * @param args The arguments to the command
77 78
      */
78 79
     @Override
79
-    protected void executeCommand(final InputWindow origin, final boolean isSilent, final Command command, final CommandArguments args) {
80
+    protected void executeCommand(final FrameContainer origin,
81
+            final boolean isSilent, final Command command, final CommandArguments args) {
80 82
         ((GlobalCommand) command).execute(origin, isSilent, args);
81 83
     }
82 84
 
@@ -89,8 +91,8 @@ public class DCCCommandParser extends CommandParser {
89 91
      * @param line The line input by the user
90 92
      */
91 93
     @Override
92
-    protected void handleNonCommand(final InputWindow origin, final String line) {
93
-        origin.getContainer().sendLine(line);
94
+    protected void handleNonCommand(final FrameContainer origin, final String line) {
95
+        ((WritableFrameContainer) origin).sendLine(line);
94 96
     }
95 97
 
96 98
 }

+ 2
- 1
src/com/dmdirc/addons/dcop/DcopCommand.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.dcop;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -47,7 +48,7 @@ public final class DcopCommand extends ServerCommand {
47 48
 
48 49
     /** {@inheritDoc} */
49 50
     @Override
50
-    public void execute(final InputWindow origin, final Server server,
51
+    public void execute(final FrameContainer origin, final Server server,
51 52
             final boolean isSilent, final CommandArguments args) {
52 53
         if (args.getArguments().length != 3) {
53 54
             showUsage(origin, isSilent, "dcop", "<app> <object> <function>");

+ 2
- 2
src/com/dmdirc/addons/dns/DNSCommand.java View File

@@ -22,10 +22,10 @@
22 22
 
23 23
 package com.dmdirc.addons.dns;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28
-import com.dmdirc.ui.interfaces.InputWindow;
29 29
 
30 30
 import java.util.Timer;
31 31
 import java.util.TimerTask;
@@ -44,7 +44,7 @@ public final class DNSCommand extends GlobalCommand {
44 44
     
45 45
     /** {@inheritDoc} */
46 46
     @Override
47
-    public void execute(final InputWindow origin, final boolean isSilent,
47
+    public void execute(final FrameContainer origin, final boolean isSilent,
48 48
             final CommandArguments args) {
49 49
         if (args.getArguments().length == 0) {
50 50
             showUsage(origin, isSilent, "dns", "<IP|hostname>");

+ 3
- 2
src/com/dmdirc/addons/freedesktop_notifications/FDNotifyCommand.java View File

@@ -22,10 +22,10 @@
22 22
 
23 23
 package com.dmdirc.addons.freedesktop_notifications;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28
-import com.dmdirc.ui.interfaces.InputWindow;
29 29
 
30 30
 /**
31 31
  * The FDNotify Command shows a nice popup on using the FreeDesktop
@@ -50,7 +50,8 @@ public final class FDNotifyCommand extends GlobalCommand {
50 50
 
51 51
     /** {@inheritDoc} */
52 52
     @Override
53
-    public void execute(final InputWindow origin, final boolean isSilent, final CommandArguments args) {
53
+    public void execute(final FrameContainer origin, final boolean isSilent,
54
+            final CommandArguments args) {
54 55
         myPlugin.showNotification("", args.getArgumentsAsString());
55 56
     }
56 57
     

+ 3
- 2
src/com/dmdirc/addons/logging/LoggingCommand.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.logging;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
@@ -50,7 +51,7 @@ public final class LoggingCommand extends ServerCommand implements IntelligentCo
50 51
 
51 52
     /** {@inheritDoc} */
52 53
     @Override
53
-    public void execute(final InputWindow origin, final Server server,
54
+    public void execute(final FrameContainer origin, final Server server,
54 55
                         final boolean isSilent, final CommandArguments args) {
55 56
         final PluginInfo pluginInfo = PluginManager.getPluginManager().getPluginInfoByName("logging");
56 57
         if (pluginInfo == null) {
@@ -74,7 +75,7 @@ public final class LoggingCommand extends ServerCommand implements IntelligentCo
74 75
                     sendLine(origin, isSilent, FORMAT_ERROR, "Plugin failed to reload.");
75 76
                 }
76 77
             } else if (args.getArguments()[0].equalsIgnoreCase("history")) {
77
-                if (!plugin.showHistory(origin)) {
78
+                if (!plugin.showHistory((InputWindow) origin.getFrame())) {
78 79
                     sendLine(origin, isSilent, FORMAT_ERROR, "Unable to open history for this window.");
79 80
                 }
80 81
             } else if (args.getArguments()[0].equalsIgnoreCase("help")) {

+ 3
- 3
src/com/dmdirc/addons/nowplaying/NowPlayingCommand.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.nowplaying;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.MessageTarget;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -31,7 +32,6 @@ import com.dmdirc.commandparser.commands.IntelligentCommand;
31 32
 import com.dmdirc.config.IdentityManager;
32 33
 import com.dmdirc.ui.input.AdditionalTabTargets;
33 34
 import com.dmdirc.ui.input.TabCompleter;
34
-import com.dmdirc.ui.interfaces.InputWindow;
35 35
 
36 36
 import java.util.Arrays;
37 37
 import java.util.List;
@@ -61,7 +61,7 @@ public final class NowPlayingCommand extends ChatCommand implements IntelligentC
61 61
     
62 62
     /** {@inheritDoc} */
63 63
     @Override
64
-    public void execute(final InputWindow origin, final Server server,
64
+    public void execute(final FrameContainer origin, final Server server,
65 65
             final MessageTarget target, final boolean isSilent, final CommandArguments args) {
66 66
         if (args.getArguments().length > 0 && args.getArguments()[0]
67 67
                 .equalsIgnoreCase("--sources")) {
@@ -104,7 +104,7 @@ public final class NowPlayingCommand extends ChatCommand implements IntelligentC
104 104
      * @param isSilent Whether this command is being silenced
105 105
      * @param format Format to be passed to getInformation
106 106
      */
107
-    private void doSourceList(final InputWindow origin, final boolean isSilent,
107
+    private void doSourceList(final FrameContainer origin, final boolean isSilent,
108 108
             final String format) {
109 109
         final List<MediaSource> sources = parent.getSources();
110 110
         

+ 2
- 2
src/com/dmdirc/addons/osd/OsdCommand.java View File

@@ -22,12 +22,12 @@
22 22
 
23 23
 package com.dmdirc.addons.osd;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28 29
 import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.ui.input.AdditionalTabTargets;
30
-import com.dmdirc.ui.interfaces.InputWindow;
31 31
 import com.dmdirc.ui.messages.Styliser;
32 32
 
33 33
 /**
@@ -70,7 +70,7 @@ public final class OsdCommand extends GlobalCommand implements IntelligentComman
70 70
 
71 71
     /** {@inheritDoc} */
72 72
     @Override
73
-    public void execute(final InputWindow origin, final boolean isSilent,
73
+    public void execute(final FrameContainer origin, final boolean isSilent,
74 74
             final CommandArguments args) {
75 75
         if (args.getArguments().length > 0
76 76
                 && "--close".equalsIgnoreCase(args.getArguments()[0])) {

+ 3
- 3
src/com/dmdirc/addons/redirect/RedirectCommand.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.redirect;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.MessageTarget;
26 27
 import com.dmdirc.Server;
27 28
 import com.dmdirc.commandparser.CommandArguments;
@@ -29,7 +30,6 @@ import com.dmdirc.commandparser.commands.ChatCommand;
29 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
30 31
 import com.dmdirc.ui.input.AdditionalTabTargets;
31 32
 import com.dmdirc.ui.input.TabCompleter;
32
-import com.dmdirc.ui.interfaces.InputWindow;
33 33
 
34 34
 /**
35 35
  * The redirect command allows the user to redirect the output from another
@@ -45,9 +45,9 @@ public class RedirectCommand extends ChatCommand implements IntelligentCommand {
45 45
     
46 46
     /** {@inheritDoc} */
47 47
     @Override
48
-    public void execute(final InputWindow origin, final Server server,
48
+    public void execute(final FrameContainer origin, final Server server,
49 49
             final MessageTarget target, final boolean isSilent, final CommandArguments args) {
50
-        target.getFrame().getCommandParser().parseCommand(new FakeInputWindow(target),
50
+        target.getFrame().getCommandParser().parseCommand(target, // TODO: This doesn't redirect
51 51
                 args.getArgumentsAsString());
52 52
     }
53 53
     

+ 4
- 17
src/com/dmdirc/addons/scriptplugin/ScriptCommand.java View File

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.addons.scriptplugin;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.config.IdentityManager;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.GlobalCommand;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.ui.input.AdditionalTabTargets;
32 32
 
@@ -56,16 +56,9 @@ public final class ScriptCommand extends GlobalCommand implements IntelligentCom
56 56
         CommandManager.registerCommand(this);
57 57
     }
58 58
         
59
-    /**
60
-     * Executes this command.
61
-     *
62
-     * @param origin The frame in which this command was issued
63
-     * @param server The server object that this command is associated with
64
-     * @param isSilent Whether this command is silenced or not
65
-     * @param args The user supplied arguments
66
-     */
59
+    /** {@inheritDoc} */
67 60
     @Override
68
-    public void execute(final InputWindow origin, final boolean isSilent, final CommandArguments commandArgs) {
61
+    public void execute(final FrameContainer origin, final boolean isSilent, final CommandArguments commandArgs) {
69 62
         final String[] args = commandArgs.getArguments();
70 63
     
71 64
         if (args.length > 0 && (args[0].equalsIgnoreCase("rehash") || args[0].equalsIgnoreCase("reload"))) {
@@ -178,13 +171,7 @@ public final class ScriptCommand extends GlobalCommand implements IntelligentCom
178 171
         }
179 172
     }
180 173
 
181
-    /**
182
-     * Returns a list of suggestions for the specified argument, given the list
183
-     * of previous arguments.
184
-     * @param arg The argument that is being completed
185
-     * @param previousArgs The contents of the previous arguments, if any
186
-     * @return A list of suggestions for the argument
187
-     */
174
+    /** {@inheritDoc} */
188 175
     @Override
189 176
     public AdditionalTabTargets getSuggestions(final int arg,
190 177
             final IntelligentCommandContext context) {

+ 2
- 2
src/com/dmdirc/addons/systray/PopupCommand.java View File

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.addons.systray;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.Server;
26 27
 import com.dmdirc.commandparser.CommandArguments;
27 28
 import com.dmdirc.commandparser.CommandManager;
28 29
 import com.dmdirc.commandparser.commands.ServerCommand;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 
31 31
 /**
32 32
  * The /popup command allows the user to show a popup message from the system
@@ -64,7 +64,7 @@ public final class PopupCommand extends ServerCommand {
64 64
 
65 65
     /** {@inheritDoc} */
66 66
     @Override
67
-    public void execute(final InputWindow origin, final Server server,
67
+    public void execute(final FrameContainer origin, final Server server,
68 68
             final boolean isSilent, final CommandArguments args) {
69 69
         showPopup("DMDirc", args.getArgumentsAsString());
70 70
     }

+ 5
- 4
src/com/dmdirc/addons/time/TimedCommand.java View File

@@ -22,9 +22,10 @@
22 22
 
23 23
 package com.dmdirc.addons.time;
24 24
 
25
+import com.dmdirc.FrameContainer;
26
+import com.dmdirc.WritableFrameContainer;
25 27
 import com.dmdirc.commandparser.parsers.CommandParser;
26 28
 import com.dmdirc.commandparser.parsers.GlobalCommandParser;
27
-import com.dmdirc.ui.interfaces.InputWindow;
28 29
 
29 30
 import java.util.Timer;
30 31
 import java.util.TimerTask;
@@ -41,7 +42,7 @@ public final class TimedCommand extends TimerTask {
41 42
     private final String command;
42 43
     
43 44
     /** The window to use for executing commands. */
44
-    private final InputWindow origin;
45
+    private final FrameContainer origin;
45 46
     
46 47
     /** The timer we're using for scheduling this command. */
47 48
     private final Timer timer;
@@ -54,7 +55,7 @@ public final class TimedCommand extends TimerTask {
54 55
      * @param origin The command window to use for the execution
55 56
      */
56 57
     public TimedCommand(final int repetitions, final int delay,
57
-            final String command, final InputWindow origin) {
58
+            final String command, final FrameContainer origin) {
58 59
         super();
59 60
         
60 61
         this.repetitions = repetitions;
@@ -72,7 +73,7 @@ public final class TimedCommand extends TimerTask {
72 73
         if (origin == null) {
73 74
             parser = GlobalCommandParser.getGlobalCommandParser();
74 75
         } else {
75
-            parser = origin.getCommandParser();
76
+            parser = ((WritableFrameContainer) origin).getFrame().getCommandParser();
76 77
         }
77 78
         
78 79
         parser.parseCommand(origin, command);

+ 3
- 3
src/com/dmdirc/addons/time/TimerCommand.java View File

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc.addons.time;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.commands.GlobalCommand;
28 29
 import com.dmdirc.commandparser.commands.IntelligentCommand;
29 30
 import com.dmdirc.ui.input.AdditionalTabTargets;
30 31
 import com.dmdirc.ui.input.TabCompleter;
31
-import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 /**
34 34
  * The timer command allows users to schedule commands to occur after a certain
@@ -46,7 +46,7 @@ public final class TimerCommand extends GlobalCommand implements IntelligentComm
46 46
     
47 47
     /** {@inheritDoc} */
48 48
     @Override
49
-    public void execute(final InputWindow origin, final boolean isSilent, 
49
+    public void execute(final FrameContainer origin, final boolean isSilent,
50 50
             final CommandArguments args) {
51 51
         if (args.getArguments().length < 3) {
52 52
             doUsage(origin, isSilent);
@@ -73,7 +73,7 @@ public final class TimerCommand extends GlobalCommand implements IntelligentComm
73 73
      * @param origin The window that the command was entered in
74 74
      * @param isSilent Whether this command is being silenced or not
75 75
      */
76
-    private void doUsage(final InputWindow origin, final boolean isSilent) {
76
+    private void doUsage(final FrameContainer origin, final boolean isSilent) {
77 77
         showUsage(origin, isSilent, "timer", "<repetitions> <interval> <command>");
78 78
     }
79 79
     

+ 1
- 1
src/com/dmdirc/addons/ui_swing/actions/CommandAction.java View File

@@ -74,7 +74,7 @@ public class CommandAction extends AbstractAction {
74 74
      */
75 75
     @Override
76 76
     public void actionPerformed(final ActionEvent e) {
77
-        parser.parseCommand(window, command);
77
+        parser.parseCommand(window.getContainer(), command);
78 78
     }
79 79
     
80 80
 }

+ 2
- 2
src/com/dmdirc/addons/urlcatcher/UrlListCommand.java View File

@@ -22,11 +22,11 @@
22 22
 
23 23
 package com.dmdirc.addons.urlcatcher;
24 24
 
25
+import com.dmdirc.FrameContainer;
25 26
 import com.dmdirc.commandparser.CommandArguments;
26 27
 import com.dmdirc.commandparser.commands.GlobalCommand;
27 28
 import com.dmdirc.commandparser.commands.IntelligentCommand;
28 29
 import com.dmdirc.ui.input.AdditionalTabTargets;
29
-import com.dmdirc.ui.interfaces.InputWindow;
30 30
 
31 31
 import java.util.Map;
32 32
 
@@ -44,7 +44,7 @@ public class UrlListCommand extends GlobalCommand implements IntelligentCommand
44 44
 
45 45
     /** {@inheritDoc} */
46 46
     @Override
47
-    public void execute(final InputWindow origin, final boolean isSilent,
47
+    public void execute(final FrameContainer origin, final boolean isSilent,
48 48
             final CommandArguments args) {
49 49
         final String[] headers = {"URL", "Count"};
50 50
         final Map<String, Integer> map = plugin.getURLS();

+ 1
- 1
test/com/dmdirc/addons/redirect/RedirectCommandTest.java View File

@@ -52,7 +52,7 @@ public class RedirectCommandTest {
52 52
         when(window.getCommandParser()).thenReturn(parser);
53 53
         when(window.getConfigManager()).thenReturn(IdentityManager.getGlobalConfig());
54 54
 
55
-        command.execute(window, null, target, false, new CommandArguments("/redirect /echo test"));
55
+        command.execute(target, null, target, false, new CommandArguments("/redirect /echo test"));
56 56
         
57 57
         verify(target).sendLine("test");
58 58
     }

Loading…
Cancel
Save