Ver código fonte

Make IRCProcessor implement handles().

Seems a bit odd for each implementation to define a method that
*always* returns a static String[] when we can just pass that
up to the base class.
pull/49/head
Chris Smith 9 anos atrás
pai
commit
1a6a31d9ea
25 arquivos alterados com 49 adições e 247 exclusões
  1. 4
    2
      irc/src/com/dmdirc/parser/irc/TimestampedIRCProcessor.java
  2. 10
    2
      irc/src/com/dmdirc/parser/irc/processors/IRCProcessor.java
  3. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/Process001.java
  4. 1
    11
      irc/src/com/dmdirc/parser/irc/processors/Process004005.java
  5. 1
    11
      irc/src/com/dmdirc/parser/irc/processors/Process464.java
  6. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessAccount.java
  7. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessAway.java
  8. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessCap.java
  9. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessInvite.java
  10. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessJoin.java
  11. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessKick.java
  12. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessList.java
  13. 13
    21
      irc/src/com/dmdirc/parser/irc/processors/ProcessListModes.java
  14. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessMOTD.java
  15. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessMessage.java
  16. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessMode.java
  17. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessNames.java
  18. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessNick.java
  19. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessNickInUse.java
  20. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessNoticeAuth.java
  21. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessPart.java
  22. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessQuit.java
  23. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessTopic.java
  24. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessWallops.java
  25. 1
    10
      irc/src/com/dmdirc/parser/irc/processors/ProcessWho.java

+ 4
- 2
irc/src/com/dmdirc/parser/irc/TimestampedIRCProcessor.java Ver arquivo

@@ -37,9 +37,11 @@ public abstract class TimestampedIRCProcessor extends IRCProcessor {
37 37
      *
38 38
      * @param parser IRCParser That owns this IRCProcessor
39 39
      * @param manager ProcessingManager that is in charge of this IRCProcessor
40
+     * @param handledTokens Tokens that this processor handles
40 41
      */
41
-    protected TimestampedIRCProcessor(final IRCParser parser, final ProcessingManager manager) {
42
-        super(parser, manager);
42
+    protected TimestampedIRCProcessor(final IRCParser parser, final ProcessingManager manager,
43
+            final String... handledTokens) {
44
+        super(parser, manager, handledTokens);
43 45
     }
44 46
 
45 47
     @Override

+ 10
- 2
irc/src/com/dmdirc/parser/irc/processors/IRCProcessor.java Ver arquivo

@@ -43,6 +43,9 @@ public abstract class IRCProcessor {
43 43
     /** Reference to the Processing in charge of this IRCProcessor. */
44 44
     protected final ProcessingManager manager;
45 45
 
46
+    /** The names of the tokens this processor handles. */
47
+    private final String[] handledTokens;
48
+
46 49
     // Some functions from the main parser are useful, and having to use parser.functionName
47 50
     // is annoying, so we also implement them here (calling them again using parser)
48 51
     /**
@@ -50,10 +53,13 @@ public abstract class IRCProcessor {
50 53
      *
51 54
      * @param parser IRCParser That owns this IRCProcessor
52 55
      * @param manager ProcessingManager that is in charge of this IRCProcessor
56
+     * @param handledTokens Tokens that this processor handles
53 57
      */
54
-    protected IRCProcessor(final IRCParser parser, final ProcessingManager manager) {
58
+    protected IRCProcessor(final IRCParser parser, final ProcessingManager manager,
59
+            final String ... handledTokens) {
55 60
         this.parser = parser;
56 61
         this.manager = manager;
62
+        this.handledTokens = handledTokens;
57 63
     }
58 64
 
59 65
     /**
@@ -153,7 +159,9 @@ public abstract class IRCProcessor {
153 159
      *
154 160
      * @return String[] with the names of the tokens we handle.
155 161
      */
156
-    public abstract String[] handles();
162
+    public String[] handles() {
163
+        return handledTokens;
164
+    }
157 165
 
158 166
     /**
159 167
      * Get the name for this Processor.

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/Process001.java Ver arquivo

@@ -41,7 +41,7 @@ public class Process001 extends IRCProcessor {
41 41
      * @param manager ProcessingManager that is in charge of this IRCProcessor
42 42
      */
43 43
     public Process001(final IRCParser parser, final ProcessingManager manager) {
44
-        super(parser, manager);
44
+        super(parser, manager, "001");
45 45
     }
46 46
 
47 47
     /**
@@ -87,13 +87,4 @@ public class Process001 extends IRCProcessor {
87 87
         parser.joinChannels(requests.toArray(new ChannelJoinRequest[requests.size()]));
88 88
     }
89 89
 
90
-    /**
91
-     * What does this IRCProcessor handle.
92
-     *
93
-     * @return String[] with the names of the tokens we handle.
94
-     */
95
-    @Override
96
-    public String[] handles() {
97
-        return new String[]{"001"};
98
-    }
99 90
 }

+ 1
- 11
irc/src/com/dmdirc/parser/irc/processors/Process004005.java Ver arquivo

@@ -47,7 +47,7 @@ public class Process004005 extends IRCProcessor {
47 47
      * @param manager ProcessingManager that is in charge of this IRCProcessor
48 48
      */
49 49
     public Process004005(final IRCParser parser, final ProcessingManager manager) {
50
-        super(parser, manager);
50
+        super(parser, manager, "002", "003", "004", "005");
51 51
     }
52 52
 
53 53
     /**
@@ -74,16 +74,6 @@ public class Process004005 extends IRCProcessor {
74 74
         }
75 75
     }
76 76
 
77
-    /**
78
-     * What does this IRCProcessor handle.
79
-     *
80
-     * @return String[] with the names of the tokens we handle.
81
-     */
82
-    @Override
83
-    public String[] handles() {
84
-        return new String[]{"002", "003", "004", "005"};
85
-    }
86
-
87 77
     /**
88 78
      * Callback to all objects implementing the GotNetwork Callback.
89 79
      * This takes no params of its own, but works them out itself.

+ 1
- 11
irc/src/com/dmdirc/parser/irc/processors/Process464.java Ver arquivo

@@ -40,7 +40,7 @@ public class Process464 extends IRCProcessor {
40 40
      * @param manager ProcessingManager that is in charge of this IRCProcessor
41 41
      */
42 42
     public Process464(final IRCParser parser, final ProcessingManager manager) {
43
-        super(parser, manager);
43
+        super(parser, manager, "464");
44 44
     }
45 45
 
46 46
     /**
@@ -54,16 +54,6 @@ public class Process464 extends IRCProcessor {
54 54
         callPasswordRequired();
55 55
     }
56 56
 
57
-    /**
58
-     * What does this IRCProcessor handle.
59
-     *
60
-     * @return String[] with the names of the tokens we handle.
61
-     */
62
-    @Override
63
-    public String[] handles() {
64
-        return new String[]{"464"};
65
-    }
66
-
67 57
     /**
68 58
      * Callback to all objects implementing the PasswordRequired Callback.
69 59
      *

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessAccount.java Ver arquivo

@@ -38,7 +38,7 @@ public class ProcessAccount extends IRCProcessor {
38 38
      * @param manager ProcessingManager that is in charge of this IRCProcessor
39 39
      */
40 40
     public ProcessAccount(final IRCParser parser, final ProcessingManager manager) {
41
-        super(parser, manager);
41
+        super(parser, manager, "ACCOUNT");
42 42
     }
43 43
 
44 44
     /**
@@ -56,13 +56,4 @@ public class ProcessAccount extends IRCProcessor {
56 56
         }
57 57
     }
58 58
 
59
-    /**
60
-     * What does this IRCProcessor handle.
61
-     *
62
-     * @return String[] with the names of the tokens we handle.
63
-     */
64
-    @Override
65
-    public String[] handles() {
66
-        return new String[]{"ACCOUNT"};
67
-    }
68 59
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessAway.java Ver arquivo

@@ -41,7 +41,7 @@ public class ProcessAway extends IRCProcessor {
41 41
      * @param manager ProcessingManager that is in charge of this IRCProcessor
42 42
      */
43 43
     public ProcessAway(final IRCParser parser, final ProcessingManager manager) {
44
-        super(parser, manager);
44
+        super(parser, manager, "301", "305", "306", "AWAY");
45 45
     }
46 46
 
47 47
     /**
@@ -96,13 +96,4 @@ public class ProcessAway extends IRCProcessor {
96 96
                 .onAwayState(parser, new Date(), oldState, currentState, reason);
97 97
     }
98 98
 
99
-    /**
100
-     * What does this IRCProcessor handle.
101
-     *
102
-     * @return String[] with the names of the tokens we handle.
103
-     */
104
-    @Override
105
-    public String[] handles() {
106
-        return new String[]{"301", "305", "306", "AWAY"};
107
-    }
108 99
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessCap.java Ver arquivo

@@ -56,7 +56,7 @@ public class ProcessCap extends TimestampedIRCProcessor {
56 56
      * @param manager ProcessingManager that is in charge of this IRCProcessor
57 57
      */
58 58
     public ProcessCap(final IRCParser parser, final ProcessingManager manager) {
59
-        super(parser, manager);
59
+        super(parser, manager, "CAP");
60 60
 
61 61
         // IRCv3.1 Standard
62 62
         supportedCapabilities.add("multi-prefix");
@@ -131,13 +131,4 @@ public class ProcessCap extends TimestampedIRCProcessor {
131 131
         }
132 132
     }
133 133
 
134
-    /**
135
-     * What does this IRCProcessor handle.
136
-     *
137
-     * @return String[] with the names of the tokens we handle.
138
-     */
139
-    @Override
140
-    public String[] handles() {
141
-        return new String[]{"CAP"};
142
-    }
143 134
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessInvite.java Ver arquivo

@@ -40,7 +40,7 @@ public class ProcessInvite extends IRCProcessor {
40 40
      * @param manager ProcessingManager that is in charge of this IRCProcessor
41 41
      */
42 42
     public ProcessInvite(final IRCParser parser, final ProcessingManager manager) {
43
-        super(parser, manager);
43
+        super(parser, manager, "INVITE");
44 44
     }
45 45
 
46 46
     /**
@@ -68,13 +68,4 @@ public class ProcessInvite extends IRCProcessor {
68 68
         getCallback(InviteListener.class).onInvite(parser, new Date(), userHost, channel);
69 69
     }
70 70
 
71
-    /**
72
-     * What does this IRCProcessor handle.
73
-     *
74
-     * @return String[] with the names of the tokens we handle.
75
-     */
76
-    @Override
77
-    public String[] handles() {
78
-        return new String[]{"INVITE"};
79
-    }
80 71
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessJoin.java Ver arquivo

@@ -65,7 +65,7 @@ public class ProcessJoin extends IRCProcessor {
65 65
     public ProcessJoin(final IRCParser parser, final PrefixModeManager prefixModeManager,
66 66
             final ModeManager userModeManager, final ModeManager chanModeManager,
67 67
             final ProcessingManager manager) {
68
-        super(parser, manager);
68
+        super(parser, manager, "JOIN", "329");
69 69
         this.prefixModeManager = prefixModeManager;
70 70
         this.userModeManager = userModeManager;
71 71
         this.chanModeManager = chanModeManager;
@@ -197,13 +197,4 @@ public class ProcessJoin extends IRCProcessor {
197 197
         getCallback(ChannelSelfJoinListener.class).onChannelSelfJoin(parser, new Date(), cChannel);
198 198
     }
199 199
 
200
-    /**
201
-     * What does this IRCProcessor handle.
202
-     *
203
-     * @return String[] with the names of the tokens we handle.
204
-     */
205
-    @Override
206
-    public String[] handles() {
207
-        return new String[]{"JOIN", "329"};
208
-    }
209 200
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessKick.java Ver arquivo

@@ -47,7 +47,7 @@ public class ProcessKick extends IRCProcessor {
47 47
      * @param manager ProcessingManager that is in charge of this IRCProcessor
48 48
      */
49 49
     public ProcessKick(final IRCParser parser, final ProcessingManager manager) {
50
-        super(parser, manager);
50
+        super(parser, manager, "KICK");
51 51
     }
52 52
 
53 53
     /**
@@ -126,13 +126,4 @@ public class ProcessKick extends IRCProcessor {
126 126
                         sReason, sKickedByHost);
127 127
     }
128 128
 
129
-    /**
130
-     * What does this IRCProcessor handle.
131
-     *
132
-     * @return String[] with the names of the tokens we handle.
133
-     */
134
-    @Override
135
-    public String[] handles() {
136
-        return new String[]{"KICK"};
137
-    }
138 129
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessList.java Ver arquivo

@@ -42,7 +42,7 @@ public class ProcessList extends IRCProcessor {
42 42
      * @param manager ProcessingManager that is in charge of this IRCProcessor
43 43
      */
44 44
     public ProcessList(final IRCParser parser, final ProcessingManager manager) {
45
-        super(parser, manager);
45
+        super(parser, manager, "321", "322", "323");
46 46
     }
47 47
 
48 48
     /**
@@ -71,13 +71,4 @@ public class ProcessList extends IRCProcessor {
71 71
         }
72 72
     }
73 73
 
74
-    /**
75
-     * What does this IRCProcessor handle.
76
-     *
77
-     * @return String[] with the names of the tokens we handle.
78
-     */
79
-    @Override
80
-    public String[] handles() {
81
-        return new String[]{"321", "322", "323"};
82
-    }
83 74
 }

+ 13
- 21
irc/src/com/dmdirc/parser/irc/processors/ProcessListModes.java Ver arquivo

@@ -48,7 +48,19 @@ public class ProcessListModes extends IRCProcessor {
48 48
      * @param manager ProcessingManager that is in charge of this IRCProcessor
49 49
      */
50 50
     public ProcessListModes(final IRCParser parser, final ProcessingManager manager) {
51
-        super(parser, manager);
51
+        super(parser, manager,
52
+                "367", "368", /* Bans */
53
+                "344", "345", /* Reop list (ircnet) or bad words (euirc) */
54
+                "346", "347", /* Invite List */
55
+                "348", "349", /* Except/Exempt List */
56
+                "386", "387", /* Channel Owner List (swiftirc ) */
57
+                "388", "389", /* Protected User List (swiftirc) */
58
+                "940", "941", /* Censored words list */
59
+                "910", "911", /* INSPIRCD Channel Access List. */
60
+                "954", "953", /* INSPIRCD exemptchanops List. */
61
+                "482",        /* Permission Denied */
62
+                "__LISTMODE__" /* Sensible List Modes */
63
+        );
52 64
     }
53 65
 
54 66
     /**
@@ -267,26 +279,6 @@ public class ProcessListModes extends IRCProcessor {
267 279
         }
268 280
     }
269 281
 
270
-    /**
271
-     * What does this IRCProcessor handle.
272
-     *
273
-     * @return String[] with the names of the tokens we handle.
274
-     */
275
-    @Override
276
-    public String[] handles() {
277
-        return new String[]{"367", "368", /* Bans */
278
-                    "344", "345", /* Reop list (ircnet) or bad words (euirc) */
279
-                    "346", "347", /* Invite List */
280
-                    "348", "349", /* Except/Exempt List */
281
-                    "386", "387", /* Channel Owner List (swiftirc ) */
282
-                    "388", "389", /* Protected User List (swiftirc) */
283
-                    "940", "941", /* Censored words list */
284
-                    "910", "911", /* INSPIRCD Channel Access List. */
285
-                    "954", "953", /* INSPIRCD exemptchanops List. */
286
-                    "482", /* Permission Denied */
287
-                    "__LISTMODE__" /* Sensible List Modes */};
288
-    }
289
-
290 282
     /**
291 283
      * Callback to all objects implementing the ChannelGotListModes Callback.
292 284
      *

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessMOTD.java Ver arquivo

@@ -42,7 +42,7 @@ public class ProcessMOTD extends IRCProcessor {
42 42
      * @param manager ProcessingManager that is in charge of this IRCProcessor
43 43
      */
44 44
     public ProcessMOTD(final IRCParser parser, final ProcessingManager manager) {
45
-        super(parser, manager);
45
+        super(parser, manager, "372", "375", "376", "422");
46 46
     }
47 47
 
48 48
     /**
@@ -97,13 +97,4 @@ public class ProcessMOTD extends IRCProcessor {
97 97
         getCallback(MotdStartListener.class).onMOTDStart(parser, new Date(), data);
98 98
     }
99 99
 
100
-    /**
101
-     * What does this IRCProcessor handle.
102
-     *
103
-     * @return String[] with the names of the tokens we handle.
104
-     */
105
-    @Override
106
-    public String[] handles() {
107
-        return new String[]{"372", "375", "376", "422"};
108
-    }
109 100
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessMessage.java Ver arquivo

@@ -78,7 +78,7 @@ public class ProcessMessage extends TimestampedIRCProcessor {
78 78
      */
79 79
     public ProcessMessage(final IRCParser parser, final PrefixModeManager prefixModeManager,
80 80
             final ProcessingManager manager) {
81
-        super(parser, manager);
81
+        super(parser, manager, "PRIVMSG", "NOTICE");
82 82
         this.prefixModeManager = prefixModeManager;
83 83
     }
84 84
 
@@ -586,13 +586,4 @@ public class ProcessMessage extends TimestampedIRCProcessor {
586 586
                 .onUnknownServerNotice(parser, date, sMessage, sTarget, sHost);
587 587
     }
588 588
 
589
-    /**
590
-     * What does this IRCProcessor handle.
591
-     *
592
-     * @return String[] with the names of the tokens we handle.
593
-     */
594
-    @Override
595
-    public String[] handles() {
596
-        return new String[]{"PRIVMSG", "NOTICE"};
597
-    }
598 589
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessMode.java Ver arquivo

@@ -68,7 +68,7 @@ public class ProcessMode extends IRCProcessor {
68 68
     public ProcessMode(final IRCParser parser, final PrefixModeManager prefixModeManager,
69 69
             final ModeManager userModeManager, final ModeManager chanModeManager,
70 70
             final ProcessingManager manager) {
71
-        super(parser, manager);
71
+        super(parser, manager, "MODE", "324", "221");
72 72
         this.prefixModeManager = prefixModeManager;
73 73
         this.userModeManager = userModeManager;
74 74
         this.chanModeManager = chanModeManager;
@@ -398,13 +398,4 @@ public class ProcessMode extends IRCProcessor {
398 398
                 .onUserModeDiscovered(parser, new Date(), cClient, sModes);
399 399
     }
400 400
 
401
-    /**
402
-     * What does this IRCProcessor handle.
403
-     *
404
-     * @return String[] with the names of the tokens we handle.
405
-     */
406
-    @Override
407
-    public String[] handles() {
408
-        return new String[]{"MODE", "324", "221"};
409
-    }
410 401
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessNames.java Ver arquivo

@@ -55,7 +55,7 @@ public class ProcessNames extends IRCProcessor {
55 55
      */
56 56
     public ProcessNames(final IRCParser parser, final PrefixModeManager prefixModeManager,
57 57
             final ModeManager userModeManager, final ProcessingManager manager) {
58
-        super(parser, manager);
58
+        super(parser, manager, "353", "366");
59 59
         this.prefixModeManager = prefixModeManager;
60 60
         this.userModeManager = userModeManager;
61 61
     }
@@ -162,13 +162,4 @@ public class ProcessNames extends IRCProcessor {
162 162
                 .onChannelGotNames(parser, new Date(), cChannel);
163 163
     }
164 164
 
165
-    /**
166
-     * What does this IRCProcessor handle.
167
-     *
168
-     * @return String[] with the names of the tokens we handle.
169
-     */
170
-    @Override
171
-    public String[] handles() {
172
-        return new String[]{"353", "366"};
173
-    }
174 165
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessNick.java Ver arquivo

@@ -48,7 +48,7 @@ public class ProcessNick extends IRCProcessor {
48 48
      * @param manager ProcessingManager that is in charge of this IRCProcessor
49 49
      */
50 50
     public ProcessNick(final IRCParser parser, final ProcessingManager manager) {
51
-        super(parser, manager);
51
+        super(parser, manager, "NICK");
52 52
     }
53 53
 
54 54
     /**
@@ -125,13 +125,4 @@ public class ProcessNick extends IRCProcessor {
125 125
                 .onNickChanged(parser, new Date(), cClient, sOldNick);
126 126
     }
127 127
 
128
-    /**
129
-     * What does this IRCProcessor handle.
130
-     *
131
-     * @return String[] with the names of the tokens we handle.
132
-     */
133
-    @Override
134
-    public String[] handles() {
135
-        return new String[]{"NICK"};
136
-    }
137 128
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessNickInUse.java Ver arquivo

@@ -46,7 +46,7 @@ public class ProcessNickInUse extends IRCProcessor {
46 46
      * @param manager ProcessingManager that is in charge of this object
47 47
      */
48 48
     public ProcessNickInUse(final IRCParser parser, final ProcessingManager manager) {
49
-        super(parser, manager);
49
+        super(parser, manager, "433");
50 50
     }
51 51
 
52 52
     /**
@@ -77,13 +77,4 @@ public class ProcessNickInUse extends IRCProcessor {
77 77
                 .onNickInUse(parser, new Date(), nickname);
78 78
     }
79 79
 
80
-    /**
81
-     * What does this IRCProcessor handle.
82
-     *
83
-     * @return String[] with the names of the tokens we handle.
84
-     */
85
-    @Override
86
-    public String[] handles() {
87
-        return new String[]{"433"};
88
-    }
89 80
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessNoticeAuth.java Ver arquivo

@@ -40,7 +40,7 @@ public class ProcessNoticeAuth extends IRCProcessor {
40 40
      * @param manager ProcessingManager that is in charge of this object
41 41
      */
42 42
     public ProcessNoticeAuth(final IRCParser parser, final ProcessingManager manager) {
43
-        super(parser, manager);
43
+        super(parser, manager, "Notice Auth");
44 44
     }
45 45
 
46 46
     /**
@@ -64,13 +64,4 @@ public class ProcessNoticeAuth extends IRCProcessor {
64 64
         getCallback(AuthNoticeListener.class).onNoticeAuth(parser, new Date(), data);
65 65
     }
66 66
 
67
-    /**
68
-     * What does this IRCProcessor handle.
69
-     *
70
-     * @return String[] with the names of the tokens we handle.
71
-     */
72
-    @Override
73
-    public String[] handles() {
74
-        return new String[]{"Notice Auth"};
75
-    }
76 67
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessPart.java Ver arquivo

@@ -46,7 +46,7 @@ public class ProcessPart extends IRCProcessor {
46 46
      * @param manager ProcessingManager that is in charge of this IRCProcessor
47 47
      */
48 48
     public ProcessPart(final IRCParser parser, final ProcessingManager manager) {
49
-        super(parser, manager);
49
+        super(parser, manager, "PART");
50 50
     }
51 51
 
52 52
     /**
@@ -118,13 +118,4 @@ public class ProcessPart extends IRCProcessor {
118 118
                 .onChannelPart(parser, new Date(), cChannel, cChannelClient, sReason);
119 119
     }
120 120
 
121
-    /**
122
-     * What does this IRCProcessor handle.
123
-     *
124
-     * @return String[] with the names of the tokens we handle.
125
-     */
126
-    @Override
127
-    public String[] handles() {
128
-        return new String[]{"PART"};
129
-    }
130 121
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessQuit.java Ver arquivo

@@ -48,7 +48,7 @@ public class ProcessQuit extends IRCProcessor {
48 48
      * @param manager ProcessingManager that is in charge of this IRCProcessor
49 49
      */
50 50
     public ProcessQuit(final IRCParser parser, final ProcessingManager manager) {
51
-        super(parser, manager);
51
+        super(parser, manager, "QUIT");
52 52
     }
53 53
 
54 54
     /**
@@ -137,13 +137,4 @@ public class ProcessQuit extends IRCProcessor {
137 137
                 .onQuit(parser, new Date(), cClient, sReason);
138 138
     }
139 139
 
140
-    /**
141
-     * What does this IRCProcessor handle.
142
-     *
143
-     * @return String[] with the names of the tokens we handle.
144
-     */
145
-    @Override
146
-    public String[] handles() {
147
-        return new String[]{"QUIT"};
148
-    }
149 140
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessTopic.java Ver arquivo

@@ -43,7 +43,7 @@ public class ProcessTopic extends IRCProcessor {
43 43
      * @param manager ProcessingManager that is in charge of this IRCProcessor
44 44
      */
45 45
     public ProcessTopic(final IRCParser parser, final ProcessingManager manager) {
46
-        super(parser, manager);
46
+        super(parser, manager, "TOPIC", "332", "333");
47 47
     }
48 48
 
49 49
     /**
@@ -108,13 +108,4 @@ public class ProcessTopic extends IRCProcessor {
108 108
                 .onChannelTopic(parser, new Date(), cChannel, bIsJoinTopic);
109 109
     }
110 110
 
111
-    /**
112
-     * What does this IRCProcessor handle.
113
-     *
114
-     * @return String[] with the names of the tokens we handle.
115
-     */
116
-    @Override
117
-    public String[] handles() {
118
-        return new String[]{"TOPIC", "332", "333"};
119
-    }
120 111
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessWallops.java Ver arquivo

@@ -42,7 +42,7 @@ public class ProcessWallops extends IRCProcessor {
42 42
      * @param manager ProcessingManager that is in charge of this IRCProcessor
43 43
      */
44 44
     public ProcessWallops(final IRCParser parser, final ProcessingManager manager) {
45
-        super(parser, manager);
45
+        super(parser, manager, "WALLOPS");
46 46
     }
47 47
 
48 48
     /**
@@ -111,13 +111,4 @@ public class ProcessWallops extends IRCProcessor {
111 111
                 .onWallDesync(parser, new Date(), message, host);
112 112
     }
113 113
 
114
-    /**
115
-     * What does this IRCProcessor handle.
116
-     *
117
-     * @return String[] with the names of the tokens we handle.
118
-     */
119
-    @Override
120
-    public String[] handles() {
121
-        return new String[]{"WALLOPS"};
122
-    }
123 114
 }

+ 1
- 10
irc/src/com/dmdirc/parser/irc/processors/ProcessWho.java Ver arquivo

@@ -47,7 +47,7 @@ public class ProcessWho extends IRCProcessor {
47 47
      * @param manager ProcessingManager that is in charge of this IRCProcessor
48 48
      */
49 49
     public ProcessWho(final IRCParser parser, final ProcessingManager manager) {
50
-        super(parser, manager);
50
+        super(parser, manager, "352");
51 51
     }
52 52
 
53 53
     /**
@@ -142,13 +142,4 @@ public class ProcessWho extends IRCProcessor {
142 142
                         state);
143 143
     }
144 144
 
145
-    /**
146
-     * What does this IRCProcessor handle.
147
-     *
148
-     * @return String[] with the names of the tokens we handle.
149
-     */
150
-    @Override
151
-    public String[] handles() {
152
-        return new String[]{"352"};
153
-    }
154 145
 }

Carregando…
Cancelar
Salvar