Explorar el Código

All commands now have an isSilent param

git-svn-id: http://svn.dmdirc.com/trunk@1313 00569f92-eb28-0410-84fd-f71c24880f
tags/0.4
Gregory Holmes hace 17 años
padre
commit
fb66b5c5e1
Se han modificado 50 ficheros con 103 adiciones y 58 borrados
  1. 4
    2
      src/com/dmdirc/Server.java
  2. 2
    1
      src/com/dmdirc/addons/dcop/DcopCommand.java
  3. 2
    1
      src/com/dmdirc/addons/dcop/NowPlayingCommand.java
  4. 2
    1
      src/com/dmdirc/addons/logging/LoggingCommand.java
  5. 1
    1
      src/com/dmdirc/addons/systray/PopupCommand.java
  6. 4
    2
      src/com/dmdirc/commandparser/ChannelCommand.java
  7. 2
    2
      src/com/dmdirc/commandparser/ChannelCommandParser.java
  8. 3
    1
      src/com/dmdirc/commandparser/QueryCommand.java
  9. 2
    2
      src/com/dmdirc/commandparser/QueryCommandParser.java
  10. 4
    2
      src/com/dmdirc/commandparser/ServerCommand.java
  11. 1
    1
      src/com/dmdirc/commandparser/ServerCommandParser.java
  12. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Ban.java
  13. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Benchmark.java
  14. 2
    1
      src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java
  15. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Cycle.java
  16. 3
    2
      src/com/dmdirc/commandparser/commands/channel/Kick.java
  17. 2
    1
      src/com/dmdirc/commandparser/commands/channel/KickEmpty.java
  18. 2
    1
      src/com/dmdirc/commandparser/commands/channel/KickReason.java
  19. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Me.java
  20. 2
    1
      src/com/dmdirc/commandparser/commands/channel/MeEmpty.java
  21. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Mode.java
  22. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Notify.java
  23. 2
    1
      src/com/dmdirc/commandparser/commands/channel/Part.java
  24. 3
    2
      src/com/dmdirc/commandparser/commands/channel/PartDefault.java
  25. 2
    1
      src/com/dmdirc/commandparser/commands/channel/SetNickColour.java
  26. 2
    1
      src/com/dmdirc/commandparser/commands/channel/SetTopic.java
  27. 2
    1
      src/com/dmdirc/commandparser/commands/channel/ShowTopic.java
  28. 1
    1
      src/com/dmdirc/commandparser/commands/query/QueryMe.java
  29. 1
    1
      src/com/dmdirc/commandparser/commands/query/QueryMeEmpty.java
  30. 2
    1
      src/com/dmdirc/commandparser/commands/server/AllChannels.java
  31. 2
    1
      src/com/dmdirc/commandparser/commands/server/Away.java
  32. 2
    1
      src/com/dmdirc/commandparser/commands/server/Back.java
  33. 1
    1
      src/com/dmdirc/commandparser/commands/server/ChangeServer.java
  34. 2
    1
      src/com/dmdirc/commandparser/commands/server/Clear.java
  35. 2
    1
      src/com/dmdirc/commandparser/commands/server/ConfigInfo.java
  36. 2
    1
      src/com/dmdirc/commandparser/commands/server/Ctcp.java
  37. 2
    1
      src/com/dmdirc/commandparser/commands/server/Disconnect.java
  38. 2
    1
      src/com/dmdirc/commandparser/commands/server/Echo.java
  39. 2
    1
      src/com/dmdirc/commandparser/commands/server/Help.java
  40. 2
    1
      src/com/dmdirc/commandparser/commands/server/Ignore.java
  41. 2
    1
      src/com/dmdirc/commandparser/commands/server/Join.java
  42. 2
    1
      src/com/dmdirc/commandparser/commands/server/Message.java
  43. 2
    1
      src/com/dmdirc/commandparser/commands/server/Motd.java
  44. 2
    1
      src/com/dmdirc/commandparser/commands/server/Nick.java
  45. 2
    1
      src/com/dmdirc/commandparser/commands/server/Notice.java
  46. 1
    1
      src/com/dmdirc/commandparser/commands/server/Query.java
  47. 2
    1
      src/com/dmdirc/commandparser/commands/server/Raw.java
  48. 2
    1
      src/com/dmdirc/commandparser/commands/server/Reconnect.java
  49. 2
    1
      src/com/dmdirc/commandparser/commands/server/Whois.java
  50. 2
    2
      src/com/dmdirc/ui/ChannelFrame.java

+ 4
- 2
src/com/dmdirc/Server.java Ver fichero

@@ -439,8 +439,10 @@ public final class Server extends FrameContainer implements IChannelSelfJoin,
439 439
      * @param reason reason for closing
440 440
      */
441 441
     public void close(final String reason) {
442
-        // Unregister parser callbacks
443
-        parser.getCallbackManager().delAllCallback(this);
442
+        if (parser != null) {
443
+            // Unregister parser callbacks
444
+            parser.getCallbackManager().delAllCallback(this);
445
+        }
444 446
         // Unregister frame callbacks
445 447
         frame.removeInternalFrameListener(this);
446 448
         // Disconnect from the server

+ 2
- 1
src/com/dmdirc/addons/dcop/DcopCommand.java Ver fichero

@@ -51,10 +51,11 @@ public final class DcopCommand extends ServerCommand {
51 51
      * Executes this command.
52 52
      * @param origin The frame in which this command was issued
53 53
      * @param server The server object that this command is associated with
54
+     * @param isSilent Whetehr this command is silenced or not
54 55
      * @param args The user supplied arguments
55 56
      */
56 57
     public void execute(final CommandWindow origin, final Server server,
57
-            final String... args) {
58
+            final boolean isSilent, final String... args) {
58 59
         try {
59 60
             final List<String> res = DcopPlugin.getDcopResult("dcop " + implodeArgs(args));
60 61
             for (String line : res) {

+ 2
- 1
src/com/dmdirc/addons/dcop/NowPlayingCommand.java Ver fichero

@@ -54,10 +54,11 @@ public final class NowPlayingCommand extends ChannelCommand {
54 54
      * @param origin The frame in which this command was issued
55 55
      * @param server The server object that this command is associated with
56 56
      * @param channel The channel object this command is associated with
57
+     * @param isSilent Whetehr this command is silenced or not
57 58
      * @param args The user supplied arguments
58 59
      */    
59 60
     public void execute(final CommandWindow origin, final Server server, 
60
-            final Channel channel, final String... args) {
61
+            final Channel channel, final boolean isSilent, final String... args) {
61 62
         try {
62 63
             
63 64
             final List<String> res = DcopPlugin.getDcopResult("dcop amarok default nowPlaying");

+ 2
- 1
src/com/dmdirc/addons/logging/LoggingCommand.java Ver fichero

@@ -53,9 +53,10 @@ public final class LoggingCommand extends ServerCommand {
53 53
 	 *
54 54
 	 * @param origin The frame in which this command was issued
55 55
 	 * @param server The server object that this command is associated with
56
+         * @param isSilent Whetehr this command is silenced or not
56 57
 	 * @param args The user supplied arguments
57 58
 	 */
58
-	public void execute(final CommandWindow origin, final Server server, final String... args) {
59
+	public void execute(final CommandWindow origin, final Server server, final boolean isSilent, final String... args) {
59 60
 		final Plugin gotPlugin = PluginManager.getPluginManager().getPlugin("com.dmdirc.addons.logging.LoggingPlugin");
60 61
 		
61 62
 		if (gotPlugin == null || !(gotPlugin instanceof LoggingPlugin)) {

+ 1
- 1
src/com/dmdirc/addons/systray/PopupCommand.java Ver fichero

@@ -51,7 +51,7 @@ public final class PopupCommand extends ServerCommand {
51 51
 
52 52
     /** {@inheritDoc} */
53 53
     public void execute(final CommandWindow origin, final Server server,
54
-            final String ... args) {
54
+            final boolean isSilent, final String ... args) {
55 55
         parent.notify("DMDirc", implodeArgs(args));
56 56
     }
57 57
 

+ 4
- 2
src/com/dmdirc/commandparser/ChannelCommand.java Ver fichero

@@ -30,13 +30,15 @@ import com.dmdirc.Server;
30 30
  * @author chris
31 31
  */
32 32
 public abstract class ChannelCommand extends Command {
33
-        
33
+    
34 34
     /**
35 35
      * Executes this command.
36 36
      * @param origin The window in which the command was typed
37 37
      * @param server The server instance that this command is being executed on
38 38
      * @param channel The channel instance that this command is being executed on
39
+     * @param isSilent Whetehr this command is silenced or not
39 40
      * @param args Arguments passed to this command
40 41
      */
41
-    public abstract void execute(CommandWindow origin, Server server, Channel channel, String... args);
42
+    public abstract void execute(CommandWindow origin, Server server, Channel channel,
43
+            boolean isSilent, String... args);
42 44
 }

+ 2
- 2
src/com/dmdirc/commandparser/ChannelCommandParser.java Ver fichero

@@ -64,9 +64,9 @@ public final class ChannelCommandParser extends CommandParser {
64 64
     protected void executeCommand(final CommandWindow origin,
65 65
             final boolean isSilent, final Command command, final String... args) {
66 66
         if (command instanceof ChannelCommand) {
67
-            ((ChannelCommand) command).execute(origin, server, channel, args);
67
+            ((ChannelCommand) command).execute(origin, server, channel, isSilent, args);
68 68
         } else if (command instanceof ServerCommand) {
69
-            ((ServerCommand) command).execute(origin, server, args);
69
+            ((ServerCommand) command).execute(origin, server, isSilent, args);
70 70
         } else {
71 71
             ((GlobalCommand) command).execute(origin, isSilent, args);
72 72
         }

+ 3
- 1
src/com/dmdirc/commandparser/QueryCommand.java Ver fichero

@@ -36,7 +36,9 @@ public abstract class QueryCommand extends Command {
36 36
      * @param origin The window in which the command was typed
37 37
      * @param server The server instance that this command is being executed on
38 38
      * @param query The query object that the commadparser is associated with
39
+     * @param isSilent Whetehr this command is silenced or not
39 40
      * @param args Arguments passed to this command
40 41
      */
41
-    public abstract void execute(CommandWindow origin, Server server, Query query, String... args);
42
+    public abstract void execute(CommandWindow origin, Server server, Query query,
43
+            boolean isSilent,String... args);
42 44
 }

+ 2
- 2
src/com/dmdirc/commandparser/QueryCommandParser.java Ver fichero

@@ -64,9 +64,9 @@ public final class QueryCommandParser extends CommandParser {
64 64
     protected void executeCommand(final CommandWindow origin,
65 65
             final boolean isSilent, final Command command, final String... args) {
66 66
         if (command instanceof QueryCommand) {
67
-            ((QueryCommand) command).execute(origin, server, query, args);
67
+            ((QueryCommand) command).execute(origin, server, query, isSilent, args);
68 68
         } else if (command instanceof ServerCommand) {
69
-            ((ServerCommand) command).execute(origin, server, args);
69
+            ((ServerCommand) command).execute(origin, server, isSilent, args);
70 70
         } else {
71 71
             ((GlobalCommand) command).execute(origin, isSilent, args);
72 72
         }

+ 4
- 2
src/com/dmdirc/commandparser/ServerCommand.java Ver fichero

@@ -30,12 +30,14 @@ import com.dmdirc.Server;
30 30
  * @author chris
31 31
  */
32 32
 public abstract class ServerCommand extends Command {
33
-        
33
+    
34 34
     /**
35 35
      * Executes this command.
36 36
      * @param origin The window in which the command was typed
37 37
      * @param server The server instance that this command is being executed on
38
+     * @param isSilent Whetehr this command is silenced or not
38 39
      * @param args Arguments passed to this command
39 40
      */
40
-    public abstract void execute(CommandWindow origin, Server server, String ... args);
41
+    public abstract void execute(CommandWindow origin, Server server,
42
+            boolean isSilent, String ... args);
41 43
 }

+ 1
- 1
src/com/dmdirc/commandparser/ServerCommandParser.java Ver fichero

@@ -55,7 +55,7 @@ public final class ServerCommandParser extends CommandParser {
55 55
     protected void executeCommand(final CommandWindow origin,
56 56
             final boolean isSilent, final Command command, final String... args) {
57 57
         if (command instanceof ServerCommand) {
58
-            ((ServerCommand) command).execute(origin, server, args);
58
+            ((ServerCommand) command).execute(origin, server, isSilent, args);
59 59
         } else {
60 60
             ((GlobalCommand) command).execute(origin, isSilent, args);
61 61
         }

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Ban.java Ver fichero

@@ -48,10 +48,11 @@ public final class Ban extends ChannelCommand {
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50 50
      * @param channel The channel object that this command is associated with
51
+     * @param isSilent Whetehr this command is silenced or not
51 52
      * @param args The user supplied arguments
52 53
      */
53 54
     public void execute(final CommandWindow origin, final Server server,
54
-            final Channel channel, final String... args) {
55
+            final Channel channel, final boolean isSilent, final String... args) {
55 56
         
56 57
         String host = args[0];
57 58
         final ChannelClientInfo user = channel.getChannelInfo().getUser(args[0]);

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Benchmark.java Ver fichero

@@ -47,10 +47,11 @@ public final class Benchmark extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         final String[] strings = {
55 56
             "this is a test",
56 57
             "test number two",

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/ChannelSettings.java Ver fichero

@@ -47,10 +47,11 @@ public final class ChannelSettings extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         new ChannelSettingsDialog(channel).setVisible(true);
55 56
     }
56 57
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Cycle.java Ver fichero

@@ -46,10 +46,11 @@ public final class Cycle extends ChannelCommand {
46 46
      * @param origin The frame in which this command was issued
47 47
      * @param server The server object that this command is associated with
48 48
      * @param channel The channel object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final Channel channel, final String... args) {
53
+            final Channel channel, final boolean isSilent, final String... args) {
53 54
         channel.part(origin.getConfigManager().getOption("general", "cyclemessage"));
54 55
         channel.join();
55 56
     }

+ 3
- 2
src/com/dmdirc/commandparser/commands/channel/Kick.java Ver fichero

@@ -47,15 +47,16 @@ public final class Kick extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         final String[] newArgs = new String[2];
55 56
         newArgs[0] = args[0]; // Nickname
56 57
         newArgs[1] = origin.getConfigManager().getOption("general", "kickmessage");
57 58
         
58
-        CommandManager.getChannelCommand("kick").execute(origin, server, channel, newArgs);
59
+        CommandManager.getChannelCommand("kick").execute(origin, server, channel, isSilent, newArgs);
59 60
     }
60 61
     
61 62
     /** {@inheritDoc}. */

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/KickEmpty.java Ver fichero

@@ -47,10 +47,11 @@ public final class KickEmpty extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         origin.addLine("commandUsage", Config.getCommandChar(), "kick", "<user> [reason]");
55 56
     }
56 57
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/KickReason.java Ver fichero

@@ -48,10 +48,11 @@ public final class KickReason extends ChannelCommand {
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50 50
      * @param channel The channel object that this command is associated with
51
+     * @param isSilent Whetehr this command is silenced or not
51 52
      * @param args The user supplied arguments
52 53
      */
53 54
     public void execute(final CommandWindow origin, final Server server,
54
-            final Channel channel, final String... args) {
55
+            final Channel channel, final boolean isSilent, final String... args) {
55 56
         
56 57
         final ChannelClientInfo victim = channel.getChannelInfo().getUser(args[0]);
57 58
         

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Me.java Ver fichero

@@ -46,10 +46,11 @@ public final class Me extends ChannelCommand {
46 46
      * @param origin The frame in which this command was issued
47 47
      * @param server The server object that this command is associated with
48 48
      * @param channel The channel object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final Channel channel, final String... args) {
53
+            final Channel channel, final boolean isSilent, final String... args) {
53 54
         channel.sendAction(implodeArgs(args));
54 55
     }
55 56
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/MeEmpty.java Ver fichero

@@ -48,10 +48,11 @@ public final class MeEmpty extends ChannelCommand {
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50 50
      * @param channel The channel object that this command is associated with
51
+     * @param isSilent Whetehr this command is silenced or not
51 52
      * @param args The user supplied arguments
52 53
      */
53 54
     public void execute(final CommandWindow origin, final Server server,
54
-            final Channel channel, final String... args) {
55
+            final Channel channel, final boolean isSilent, final String... args) {
55 56
         origin.addLine("commandUsage", Config.getCommandChar(), "me", "<action>");
56 57
     }
57 58
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Mode.java Ver fichero

@@ -47,10 +47,11 @@ public final class Mode extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         final ChannelInfo cChannel = channel.getChannelInfo();
55 56
         
56 57
         if (args.length == 0) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Notify.java Ver fichero

@@ -51,10 +51,11 @@ public final class Notify extends ChannelCommand {
51 51
      * @param origin The frame in which this command was issued
52 52
      * @param server The server object that this command is associated with
53 53
      * @param channel The channel object that this command is associated with
54
+     * @param isSilent Whetehr this command is silenced or not
54 55
      * @param args The user supplied arguments
55 56
      */
56 57
     public void execute(final CommandWindow origin, final Server server,
57
-            final Channel channel, final String... args) {
58
+            final Channel channel, final boolean isSilent, final String... args) {
58 59
         final Color colour = ColourManager.parseColour(args[0], null);
59 60
         
60 61
         if (colour == null) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/Part.java Ver fichero

@@ -46,10 +46,11 @@ public final class Part extends ChannelCommand {
46 46
      * @param origin The frame in which this command was issued
47 47
      * @param server The server object that this command is associated with
48 48
      * @param channel The channel object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final Channel channel, final String... args) {
53
+            final Channel channel, final boolean isSilent, final String... args) {
53 54
         channel.part(implodeArgs(args));
54 55
         channel.closeWindow();
55 56
     }

+ 3
- 2
src/com/dmdirc/commandparser/commands/channel/PartDefault.java Ver fichero

@@ -48,12 +48,13 @@ public final class PartDefault extends ChannelCommand {
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50 50
      * @param channel The channel object that this command is associated with
51
+     * @param isSilent Whetehr this command is silenced or not
51 52
      * @param args The user supplied arguments
52 53
      */
53 54
     public void execute(final CommandWindow origin, final Server server,
54
-            final Channel channel, final String... args) {
55
+            final Channel channel, final boolean isSilent, final String... args) {
55 56
         final ChannelCommand com = CommandManager.getChannelCommand("part");
56
-        com.execute(origin, server, channel, origin.getConfigManager().getOption("general", "partmessage"));
57
+        com.execute(origin, server, channel, isSilent, origin.getConfigManager().getOption("general", "partmessage"));
57 58
     }
58 59
     
59 60
     /** {@inheritDoc}. */

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/SetNickColour.java Ver fichero

@@ -54,11 +54,12 @@ public final class SetNickColour extends ChannelCommand {
54 54
      * @param origin The frame in which this command was issued
55 55
      * @param server The server object that this command is associated with
56 56
      * @param channel The channel object that this command is associated with
57
+     * @param isSilent Whetehr this command is silenced or not
57 58
      * @param args The user supplied arguments
58 59
      */
59 60
     @SuppressWarnings("unchecked")
60 61
     public void execute(final CommandWindow origin, final Server server,
61
-            final Channel channel, final String... args) {
62
+            final Channel channel, final boolean isSilent, final String... args) {
62 63
         
63 64
         int offset = 0;
64 65
         boolean nicklist = true;

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/SetTopic.java Ver fichero

@@ -47,10 +47,11 @@ public final class SetTopic extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         final ChannelInfo cChannel = channel.getChannelInfo();
55 56
         final String newTopic = implodeArgs(args);
56 57
         

+ 2
- 1
src/com/dmdirc/commandparser/commands/channel/ShowTopic.java Ver fichero

@@ -47,10 +47,11 @@ public final class ShowTopic extends ChannelCommand {
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49 49
      * @param channel The channel object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final Channel channel, final String... args) {
54
+            final Channel channel, final boolean isSilent, final String... args) {
54 55
         final ChannelInfo cChannel = channel.getChannelInfo();
55 56
         
56 57
         if (cChannel.getTopic().length() > 0) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/query/QueryMe.java Ver fichero

@@ -49,7 +49,7 @@ public final class QueryMe extends QueryCommand {
49 49
      * @param args The user supplied arguments
50 50
      */
51 51
     public void execute(final CommandWindow origin, final Server server,
52
-            final Query query, final String... args) {
52
+            final Query query, final boolean isSilent, final String... args) {
53 53
         query.sendAction(implodeArgs(args));
54 54
     }
55 55
     

+ 1
- 1
src/com/dmdirc/commandparser/commands/query/QueryMeEmpty.java Ver fichero

@@ -51,7 +51,7 @@ public final class QueryMeEmpty extends QueryCommand {
51 51
      * @param args The user supplied arguments
52 52
      */
53 53
     public void execute(final CommandWindow origin, final Server server,
54
-            final Query query, final String... args) {
54
+            final Query query, final boolean isSilent, final String... args) {
55 55
         origin.addLine("commandUsage", Config.getCommandChar(), "me", "<action>");
56 56
     }
57 57
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/AllChannels.java Ver fichero

@@ -45,10 +45,11 @@ public class AllChannels extends ServerCommand {
45 45
      * Executes this command.
46 46
      * @param origin The frame in which this command was issued
47 47
      * @param server The server object that this command is associated with
48
+     * @param isSilent Whetehr this command is silenced or not
48 49
      * @param args The user supplied arguments
49 50
      */
50 51
     public void execute(final CommandWindow origin, final Server server,
51
-            final String... args) {
52
+            final boolean isSilent, final String... args) {
52 53
         final String command = implodeArgs(args);
53 54
         CommandWindow window;
54 55
         

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Away.java Ver fichero

@@ -46,10 +46,11 @@ public final class Away extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         final String line = implodeArgs(args);
54 55
         
55 56
         server.getParser().sendLine("AWAY :" + line);

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Back.java Ver fichero

@@ -46,10 +46,11 @@ public final class Back extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         //final String line = implodeArgs(args);
54 55
         
55 56
         server.getParser().sendLine("AWAY");

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/ChangeServer.java Ver fichero

@@ -45,7 +45,7 @@ public final class ChangeServer extends ServerCommand {
45 45
     
46 46
     /** {@inheritDoc} */
47 47
     public void execute(final CommandWindow origin, final Server server,
48
-            final String... args) {
48
+            final boolean isSilent, final String... args) {
49 49
         if (args.length == 0) {
50 50
             origin.addLine("commandUsage", Config.getCommandChar(), "server",
51 51
                     "[--ssl] <host[:port]> [password]");

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Clear.java Ver fichero

@@ -46,10 +46,11 @@ public class Clear extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public final void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         origin.clear();
54 55
     }
55 56
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/ConfigInfo.java Ver fichero

@@ -47,10 +47,11 @@ public class ConfigInfo extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public final void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         for (ConfigSource source : origin.getConfigManager().getSources()) {
55 56
             origin.addLine("commandOutput", source.getTarget() + " - " + source);
56 57
         }

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Ctcp.java Ver fichero

@@ -47,10 +47,11 @@ public final class Ctcp extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         if (args.length < 2) {
55 56
             origin.addLine("CommandUsage", Config.getCommandChar(),
56 57
                     "ctcp", "<target> <type> [arguments]");

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Disconnect.java Ver fichero

@@ -46,10 +46,11 @@ public final class Disconnect extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         String line;
54 55
         
55 56
         if (args.length == 0) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Echo.java Ver fichero

@@ -49,10 +49,11 @@ public final class Echo extends ServerCommand {
49 49
      * Executes this command.
50 50
      * @param origin The frame in which this command was issued
51 51
      * @param server The server object that this command is associated with
52
+     * @param isSilent Whetehr this command is silenced or not
52 53
      * @param args The user supplied arguments
53 54
      */
54 55
     public void execute(final CommandWindow origin, final Server server,
55
-            final String... args) {        
56
+            final boolean isSilent, final String... args) {        
56 57
         if (args.length > 0 && args[0].equalsIgnoreCase("--active")) {
57 58
             final JInternalFrame frame = MainFrame.getMainFrame().getActiveFrame();
58 59
             if (frame instanceof CommandWindow) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Help.java Ver fichero

@@ -54,10 +54,11 @@ public final class Help extends ServerCommand {
54 54
      * Executes this command.
55 55
      * @param origin The frame in which this command was issued
56 56
      * @param server The server object that this command is associated with
57
+     * @param isSilent Whetehr this command is silenced or not
57 58
      * @param args The user supplied arguments
58 59
      */
59 60
     public void execute(final CommandWindow origin, final Server server,
60
-            final String... args) {
61
+            final boolean isSilent, final String... args) {
61 62
         origin.addLine("commandOutput", "-- Server commands ----------------------------------");
62 63
         showCommands(CommandManager.getServerCommands(), origin);
63 64
         if (origin instanceof ChannelFrame) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Ignore.java Ver fichero

@@ -49,10 +49,11 @@ public final class Ignore extends ServerCommand {
49 49
      * Executes this command.
50 50
      * @param origin The frame in which this command was issued
51 51
      * @param server The server object that this command is associated with
52
+     * @param isSilent Whetehr this command is silenced or not
52 53
      * @param args The user supplied arguments
53 54
      */
54 55
     public void execute(final CommandWindow origin, final Server server,
55
-            final String... args) {
56
+            final boolean isSilent, final String... args) {
56 57
         
57 58
         final Identity identity = IdentityManager.getNetworkConfig(server.getNetwork());
58 59
         

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Join.java Ver fichero

@@ -47,10 +47,11 @@ public final class Join extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         server.getParser().joinChannel(args[0]);
55 56
     }
56 57
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Message.java Ver fichero

@@ -47,10 +47,11 @@ public final class Message extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         if (args.length < 2) {
55 56
             origin.addLine("commandUsage", Config.getCommandChar(), "msg",
56 57
                     "<target> <message>");

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Motd.java Ver fichero

@@ -46,10 +46,11 @@ public final class Motd extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         //final String line = implodeArgs(args);
54 55
         
55 56
         server.getParser().sendLine("MOTD");

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Nick.java Ver fichero

@@ -46,10 +46,11 @@ public final class Nick extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         server.getParser().setNickname(args[0]);
54 55
     }
55 56
     

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Notice.java Ver fichero

@@ -47,10 +47,11 @@ public final class Notice extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         if (args.length < 2) {
55 56
             origin.addLine("commandUsage", Config.getCommandChar(), "notice",
56 57
                     "<target> <message>");

+ 1
- 1
src/com/dmdirc/commandparser/commands/server/Query.java Ver fichero

@@ -46,7 +46,7 @@ public final class Query extends ServerCommand {
46 46
     
47 47
     /** {@inheritDoc} */
48 48
     public void execute(final CommandWindow origin, final Server server,
49
-            final String... args) {
49
+            final boolean isSilent, final String... args) {
50 50
         server.addQuery(args[0]);
51 51
         server.getQuery(args[0]).show();
52 52
     }

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Raw.java Ver fichero

@@ -47,10 +47,11 @@ public final class Raw extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         final String line = implodeArgs(args);
55 56
         
56 57
         server.getParser().sendLine(line);

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Reconnect.java Ver fichero

@@ -46,10 +46,11 @@ public final class Reconnect extends ServerCommand {
46 46
      * Executes this command.
47 47
      * @param origin The frame in which this command was issued
48 48
      * @param server The server object that this command is associated with
49
+     * @param isSilent Whetehr this command is silenced or not
49 50
      * @param args The user supplied arguments
50 51
      */
51 52
     public void execute(final CommandWindow origin, final Server server,
52
-            final String... args) {
53
+            final boolean isSilent, final String... args) {
53 54
         String line;
54 55
         
55 56
         if (args.length == 0) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/server/Whois.java Ver fichero

@@ -47,10 +47,11 @@ public final class Whois extends ServerCommand {
47 47
      * Executes this command.
48 48
      * @param origin The frame in which this command was issued
49 49
      * @param server The server object that this command is associated with
50
+     * @param isSilent Whetehr this command is silenced or not
50 51
      * @param args The user supplied arguments
51 52
      */
52 53
     public void execute(final CommandWindow origin, final Server server,
53
-            final String... args) {
54
+            final boolean isSilent, final String... args) {
54 55
         server.getParser().sendLine("WHOIS :" + args[0]);
55 56
     }
56 57
     

+ 2
- 2
src/com/dmdirc/ui/ChannelFrame.java Ver fichero

@@ -294,10 +294,10 @@ public final class ChannelFrame extends Frame implements MouseListener,
294 294
                 if (command instanceof ChannelCommand) {
295 295
                     ((ChannelCommand) commands.get(actionEvent.getActionCommand())).
296 296
                             execute(this, this.getServer(),
297
-                            (Channel) this.getContainer(), ((ChannelClientInfo) nickname).getNickname());
297
+                            (Channel) this.getContainer(), false, ((ChannelClientInfo) nickname).getNickname());
298 298
                 } else if (command instanceof ServerCommand) {
299 299
                     ((ServerCommand) commands.get(actionEvent.getActionCommand())).
300
-                            execute(this, this.getServer(), ((ChannelClientInfo) nickname).getNickname());
300
+                            execute(this, this.getServer(), false, ((ChannelClientInfo) nickname).getNickname());
301 301
                 }
302 302
             }
303 303
         }

Loading…
Cancelar
Guardar