Kaynağa Gözat

Abstract CommandInfos somewhat

tags/0.6.3m2a1
Chris Smith 15 yıl önce
ebeveyn
işleme
038fdfbd8f
65 değiştirilmiş dosya ile 267 ekleme ve 220 silme
  1. 6
    5
      src/com/dmdirc/Channel.java
  2. 14
    14
      src/com/dmdirc/ChannelEventHandler.java
  3. 2
    2
      src/com/dmdirc/Server.java
  4. 2
    2
      src/com/dmdirc/ServerEventHandler.java
  5. 4
    4
      src/com/dmdirc/addons/logging/LoggingPlugin.java
  6. 2
    2
      src/com/dmdirc/addons/nickcolours/NickColourPlugin.java
  7. 2
    2
      src/com/dmdirc/addons/windowstatus/WindowStatusPlugin.java
  8. 2
    2
      src/com/dmdirc/commandparser/commands/channel/Mode.java
  9. 2
    2
      src/com/dmdirc/commandparser/commands/channel/ShowTopic.java
  10. 34
    0
      src/com/dmdirc/parser/interfaces/ChannelInfo.java
  11. 9
    0
      src/com/dmdirc/parser/interfaces/Parser.java
  12. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelActionListener.java
  13. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelCtcpListener.java
  14. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelCtcpReplyListener.java
  15. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelJoinListener.java
  16. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelKickListener.java
  17. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelListModeListener.java
  18. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelMessageListener.java
  19. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelModeChangeListener.java
  20. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelModeMessageListener.java
  21. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelModeNoticeListener.java
  22. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelNamesListener.java
  23. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelNickChangeListener.java
  24. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelNonUserModeChangeListener.java
  25. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelNoticeListener.java
  26. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelOtherAwayStateListener.java
  27. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelPartListener.java
  28. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelQuitListener.java
  29. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelSelfJoinListener.java
  30. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelSingleModeChangeListener.java
  31. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelTopicListener.java
  32. 2
    2
      src/com/dmdirc/parser/interfaces/callbacks/ChannelUserModeChangeListener.java
  33. 3
    3
      src/com/dmdirc/parser/irc/ChannelClientInfo.java
  34. 3
    2
      src/com/dmdirc/parser/irc/IRCChannelInfo.java
  35. 18
    21
      src/com/dmdirc/parser/irc/IRCParser.java
  36. 4
    3
      src/com/dmdirc/parser/irc/IRCProcessor.java
  37. 6
    6
      src/com/dmdirc/parser/irc/ProcessJoin.java
  38. 3
    2
      src/com/dmdirc/parser/irc/ProcessKick.java
  39. 3
    2
      src/com/dmdirc/parser/irc/ProcessListModes.java
  40. 9
    8
      src/com/dmdirc/parser/irc/ProcessMessage.java
  41. 4
    3
      src/com/dmdirc/parser/irc/ProcessMode.java
  42. 4
    3
      src/com/dmdirc/parser/irc/ProcessNames.java
  43. 2
    2
      src/com/dmdirc/parser/irc/ProcessNick.java
  44. 3
    2
      src/com/dmdirc/parser/irc/ProcessPart.java
  45. 3
    3
      src/com/dmdirc/parser/irc/ProcessQuit.java
  46. 4
    3
      src/com/dmdirc/parser/irc/ProcessTopic.java
  47. 2
    6
      src/com/dmdirc/parser/irc/ProcessWho.java
  48. 5
    5
      src/com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.java
  49. 2
    2
      test/com/dmdirc/addons/logging/LoggingPluginTest.java
  50. 4
    4
      test/com/dmdirc/commandparser/commands/channel/KickReasonTest.java
  51. 3
    3
      test/com/dmdirc/commandparser/commands/channel/ModeTest.java
  52. 3
    3
      test/com/dmdirc/commandparser/commands/channel/NamesTest.java
  53. 1
    1
      test/com/dmdirc/commandparser/commands/channel/PartTest.java
  54. 2
    2
      test/com/dmdirc/harness/parser/TestIChannelPart.java
  55. 2
    2
      test/com/dmdirc/harness/parser/TestIChannelSelfJoin.java
  56. 2
    2
      test/com/dmdirc/harness/parser/TestIChannelTopic.java
  57. 2
    2
      test/com/dmdirc/harness/parser/TestIQuit.java
  58. 23
    22
      test/com/dmdirc/parser/irc/ChannelInfoTest.java
  59. 2
    2
      test/com/dmdirc/parser/irc/IRCParserTest.java
  60. 2
    2
      test/com/dmdirc/parser/irc/ProcessJoinTest.java
  61. 3
    3
      test/com/dmdirc/parser/irc/ProcessModeTest.java
  62. 5
    5
      test/com/dmdirc/parser/irc/ProcessNamesTest.java
  63. 2
    2
      test/com/dmdirc/parser/irc/ProcessNickTest.java
  64. 4
    4
      test/com/dmdirc/parser/irc/ProcessPartTest.java
  65. 8
    8
      test/com/dmdirc/parser/irc/ProcessQuitTest.java

+ 6
- 5
src/com/dmdirc/Channel.java Dosyayı Görüntüle

@@ -28,8 +28,9 @@ import com.dmdirc.commandparser.CommandManager;
28 28
 import com.dmdirc.commandparser.CommandType;
29 29
 import com.dmdirc.config.ConfigManager;
30 30
 import com.dmdirc.interfaces.ConfigChangeListener;
31
+import com.dmdirc.parser.interfaces.ChannelInfo;
31 32
 import com.dmdirc.parser.irc.ChannelClientInfo;
32
-import com.dmdirc.parser.irc.ChannelInfo;
33
+import com.dmdirc.parser.irc.IRCChannelInfo;
33 34
 import com.dmdirc.parser.irc.ClientInfo;
34 35
 import com.dmdirc.ui.WindowManager;
35 36
 import com.dmdirc.ui.input.TabCompleter;
@@ -101,7 +102,7 @@ public class Channel extends MessageTarget implements ConfigChangeListener,
101 102
      * @param newChannelInfo The parser's channel object that corresponds to
102 103
      * this channel
103 104
      */
104
-    public Channel(final Server newServer, final ChannelInfo newChannelInfo) {
105
+    public Channel(final Server newServer, final IRCChannelInfo newChannelInfo) {
105 106
         super("channel", newChannelInfo.getName(),
106 107
                 new ConfigManager(newServer.getIrcd(), newServer.getNetwork(),
107 108
                 newServer.getName(), newChannelInfo.getName()));
@@ -159,7 +160,7 @@ public class Channel extends MessageTarget implements ConfigChangeListener,
159 160
     @Override
160 161
     public void sendLine(final String line) {
161 162
         if (server.getState() != ServerState.CONNECTED
162
-                || server.getParser().getChannelInfo(channelInfo.getName()) == null) {
163
+                || server.getParser().getChannel(channelInfo.getName()) == null) {
163 164
             // We're not in the channel/connected to the server
164 165
             return;
165 166
         }
@@ -194,7 +195,7 @@ public class Channel extends MessageTarget implements ConfigChangeListener,
194 195
     @Override
195 196
     public void sendAction(final String action) {
196 197
         if (server.getState() != ServerState.CONNECTED
197
-                || server.getParser().getChannelInfo(channelInfo.getName()) == null) {
198
+                || server.getParser().getChannel(channelInfo.getName()) == null) {
198 199
             // We're not on the server/channel
199 200
             return;
200 201
         }
@@ -245,7 +246,7 @@ public class Channel extends MessageTarget implements ConfigChangeListener,
245 246
      *
246 247
      * @param newChannelInfo The new ChannelInfo object
247 248
      */
248
-    public void setChannelInfo(final ChannelInfo newChannelInfo) {
249
+    public void setChannelInfo(final IRCChannelInfo newChannelInfo) {
249 250
         channelInfo = newChannelInfo;
250 251
         registerCallbacks();
251 252
     }

+ 14
- 14
src/com/dmdirc/ChannelEventHandler.java Dosyayı Görüntüle

@@ -26,7 +26,7 @@ import com.dmdirc.actions.ActionManager;
26 26
 import com.dmdirc.actions.CoreActionType;
27 27
 import com.dmdirc.parser.interfaces.Parser;
28 28
 import com.dmdirc.parser.irc.ChannelClientInfo;
29
-import com.dmdirc.parser.irc.ChannelInfo;
29
+import com.dmdirc.parser.irc.IRCChannelInfo;
30 30
 import com.dmdirc.parser.irc.ClientInfo;
31 31
 import com.dmdirc.parser.irc.callbacks.CallbackManager;
32 32
 import com.dmdirc.parser.irc.callbacks.CallbackNotFoundException;
@@ -88,7 +88,7 @@ public final class ChannelEventHandler extends EventHandler implements
88 88
     /** {@inheritDoc} */
89 89
     @Override
90 90
     public void onChannelMessage(final Parser tParser,
91
-            final ChannelInfo cChannel, final ChannelClientInfo cChannelClient,
91
+            final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient,
92 92
             final String sMessage, final String sHost) {
93 93
         checkParser(tParser);
94 94
 
@@ -99,7 +99,7 @@ public final class ChannelEventHandler extends EventHandler implements
99 99
 
100 100
     /** {@inheritDoc} */
101 101
     @Override
102
-    public void onChannelGotNames(final Parser tParser, final ChannelInfo cChannel) {
102
+    public void onChannelGotNames(final Parser tParser, final IRCChannelInfo cChannel) {
103 103
         checkParser(tParser);
104 104
 
105 105
         owner.setClients(cChannel.getChannelClients());
@@ -109,7 +109,7 @@ public final class ChannelEventHandler extends EventHandler implements
109 109
     /** {@inheritDoc} */
110 110
     @Override
111 111
     public void onChannelTopic(final Parser tParser,
112
-            final ChannelInfo cChannel, final boolean bIsJoinTopic) {
112
+            final IRCChannelInfo cChannel, final boolean bIsJoinTopic) {
113 113
         checkParser(tParser);
114 114
 
115 115
         final Topic newTopic = new Topic(cChannel.getTopic(),
@@ -128,7 +128,7 @@ public final class ChannelEventHandler extends EventHandler implements
128 128
 
129 129
     /** {@inheritDoc} */
130 130
     @Override
131
-    public void onChannelJoin(final Parser tParser, final ChannelInfo cChannel,
131
+    public void onChannelJoin(final Parser tParser, final IRCChannelInfo cChannel,
132 132
             final ChannelClientInfo cChannelClient) {
133 133
         checkParser(tParser);
134 134
 
@@ -138,7 +138,7 @@ public final class ChannelEventHandler extends EventHandler implements
138 138
 
139 139
     /** {@inheritDoc} */
140 140
     @Override
141
-    public void onChannelPart(final Parser tParser, final ChannelInfo cChannel,
141
+    public void onChannelPart(final Parser tParser, final IRCChannelInfo cChannel,
142 142
             final ChannelClientInfo cChannelClient, final String sReason) {
143 143
         checkParser(tParser);
144 144
 
@@ -151,7 +151,7 @@ public final class ChannelEventHandler extends EventHandler implements
151 151
 
152 152
     /** {@inheritDoc} */
153 153
     @Override
154
-    public void onChannelKick(final Parser tParser, final ChannelInfo cChannel,
154
+    public void onChannelKick(final Parser tParser, final IRCChannelInfo cChannel,
155 155
             final ChannelClientInfo cKickedClient, final ChannelClientInfo cKickedByClient,
156 156
             final String sReason, final String sKickedByHost) {
157 157
         checkParser(tParser);
@@ -163,7 +163,7 @@ public final class ChannelEventHandler extends EventHandler implements
163 163
 
164 164
     /** {@inheritDoc} */
165 165
     @Override
166
-    public void onChannelQuit(final Parser tParser, final ChannelInfo cChannel,
166
+    public void onChannelQuit(final Parser tParser, final IRCChannelInfo cChannel,
167 167
             final ChannelClientInfo cChannelClient, final String sReason) {
168 168
         checkParser(tParser);
169 169
 
@@ -174,7 +174,7 @@ public final class ChannelEventHandler extends EventHandler implements
174 174
 
175 175
     /** {@inheritDoc} */
176 176
     @Override
177
-    public void onChannelAction(final Parser tParser, final ChannelInfo cChannel,
177
+    public void onChannelAction(final Parser tParser, final IRCChannelInfo cChannel,
178 178
             final ChannelClientInfo cChannelClient, final String sMessage,
179 179
             final String sHost) {
180 180
         checkParser(tParser);
@@ -186,7 +186,7 @@ public final class ChannelEventHandler extends EventHandler implements
186 186
 
187 187
     /** {@inheritDoc} */
188 188
     @Override
189
-    public void onChannelNickChanged(final Parser tParser, final ChannelInfo cChannel,
189
+    public void onChannelNickChanged(final Parser tParser, final IRCChannelInfo cChannel,
190 190
             final ChannelClientInfo cChannelClient, final String sOldNick) {
191 191
         checkParser(tParser);
192 192
 
@@ -198,7 +198,7 @@ public final class ChannelEventHandler extends EventHandler implements
198 198
 
199 199
     /** {@inheritDoc} */
200 200
     @Override
201
-    public void onChannelModeChanged(final Parser tParser, final ChannelInfo cChannel,
201
+    public void onChannelModeChanged(final Parser tParser, final IRCChannelInfo cChannel,
202 202
             final ChannelClientInfo cChannelClient, final String sHost,
203 203
             final String sModes) {
204 204
         checkParser(tParser);
@@ -219,7 +219,7 @@ public final class ChannelEventHandler extends EventHandler implements
219 219
     /** {@inheritDoc} */
220 220
     @Override
221 221
     public void onChannelUserModeChanged(final Parser tParser,
222
-            final ChannelInfo cChannel, final ChannelClientInfo cChangedClient,
222
+            final IRCChannelInfo cChannel, final ChannelClientInfo cChangedClient,
223 223
             final ChannelClientInfo cSetByClient, final String sHost, final String sMode) {
224 224
         checkParser(tParser);
225 225
 
@@ -237,7 +237,7 @@ public final class ChannelEventHandler extends EventHandler implements
237 237
 
238 238
     /** {@inheritDoc} */
239 239
     @Override
240
-    public void onChannelCTCP(final Parser tParser, final ChannelInfo cChannel,
240
+    public void onChannelCTCP(final Parser tParser, final IRCChannelInfo cChannel,
241 241
             final ChannelClientInfo cChannelClient, final String sType,
242 242
             final String sMessage, final String sHost) {
243 243
         checkParser(tParser);
@@ -265,7 +265,7 @@ public final class ChannelEventHandler extends EventHandler implements
265 265
     /** {@inheritDoc} */
266 266
     @Override
267 267
     public void onChannelNotice(final Parser tParser,
268
-            final ChannelInfo cChannel, final ChannelClientInfo cChannelClient,
268
+            final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient,
269 269
             final String sMessage, final String sHost) {
270 270
         checkParser(tParser);
271 271
 

+ 2
- 2
src/com/dmdirc/Server.java Dosyayı Görüntüle

@@ -35,7 +35,7 @@ import com.dmdirc.interfaces.InviteListener;
35 35
 import com.dmdirc.logger.ErrorLevel;
36 36
 import com.dmdirc.logger.Logger;
37 37
 import com.dmdirc.parser.interfaces.Parser;
38
-import com.dmdirc.parser.irc.ChannelInfo;
38
+import com.dmdirc.parser.irc.IRCChannelInfo;
39 39
 import com.dmdirc.parser.irc.ClientInfo;
40 40
 import com.dmdirc.parser.irc.IRCStringConverter;
41 41
 import com.dmdirc.parser.irc.MyInfo;
@@ -566,7 +566,7 @@ public class Server extends WritableFrameContainer implements Serializable {
566 566
      *
567 567
      * @param chan channel to add
568 568
      */
569
-    public void addChannel(final ChannelInfo chan) {
569
+    public void addChannel(final IRCChannelInfo chan) {
570 570
         synchronized (myState) {
571 571
             if (myState.getState() == ServerState.CLOSING) {
572 572
                 // Can't join channels while the server is closing

+ 2
- 2
src/com/dmdirc/ServerEventHandler.java Dosyayı Görüntüle

@@ -27,7 +27,7 @@ import com.dmdirc.actions.CoreActionType;
27 27
 import com.dmdirc.logger.ErrorLevel;
28 28
 import com.dmdirc.logger.Logger;
29 29
 import com.dmdirc.parser.interfaces.Parser;
30
-import com.dmdirc.parser.irc.ChannelInfo;
30
+import com.dmdirc.parser.irc.IRCChannelInfo;
31 31
 import com.dmdirc.parser.irc.ClientInfo;
32 32
 import com.dmdirc.parser.irc.ParserError;
33 33
 import com.dmdirc.parser.irc.callbacks.CallbackManager;
@@ -78,7 +78,7 @@ public final class ServerEventHandler extends EventHandler
78 78
 
79 79
     /** {@inheritDoc} */
80 80
     @Override
81
-    public void onChannelSelfJoin(final Parser tParser, final ChannelInfo cChannel) {
81
+    public void onChannelSelfJoin(final Parser tParser, final IRCChannelInfo cChannel) {
82 82
         checkParser(tParser);
83 83
         owner.addChannel(cChannel);
84 84
     }

+ 4
- 4
src/com/dmdirc/addons/logging/LoggingPlugin.java Dosyayı Görüntüle

@@ -40,7 +40,7 @@ import com.dmdirc.logger.ErrorLevel;
40 40
 import com.dmdirc.logger.Logger;
41 41
 import com.dmdirc.parser.interfaces.Parser;
42 42
 import com.dmdirc.parser.irc.ChannelClientInfo;
43
-import com.dmdirc.parser.irc.ChannelInfo;
43
+import com.dmdirc.parser.irc.IRCChannelInfo;
44 44
 import com.dmdirc.parser.irc.ClientInfo;
45 45
 import com.dmdirc.plugins.Plugin;
46 46
 import com.dmdirc.ui.interfaces.InputWindow;
@@ -312,7 +312,7 @@ public class LoggingPlugin extends Plugin implements ActionListener {
312 312
 	 */
313 313
 	protected void handleChannelEvent(final CoreActionType type, final StringBuffer format, final Object... arguments) {
314 314
 		final Channel chan = ((Channel)arguments[0]);
315
-		final ChannelInfo channel = chan.getChannelInfo();
315
+		final IRCChannelInfo channel = chan.getChannelInfo();
316 316
 		final String filename = getLogFile(channel);
317 317
 		
318 318
 		final ChannelClientInfo channelClient = (arguments.length > 1 && arguments[1] instanceof ChannelClientInfo) ? (ChannelClientInfo)arguments[1] : null;
@@ -608,8 +608,8 @@ public class LoggingPlugin extends Plugin implements ActionListener {
608 608
 		
609 609
 		if (obj == null) {
610 610
 			file.append("null.log");
611
-		} else if (obj instanceof ChannelInfo) {
612
-			final ChannelInfo channel = (ChannelInfo) obj;
611
+		} else if (obj instanceof IRCChannelInfo) {
612
+			final IRCChannelInfo channel = (IRCChannelInfo) obj;
613 613
 			if (channel.getParser() != null) {
614 614
 				addNetworkDir(directory, file, channel.getParser().getNetworkName());
615 615
 			}

+ 2
- 2
src/com/dmdirc/addons/nickcolours/NickColourPlugin.java Dosyayı Görüntüle

@@ -34,7 +34,7 @@ import com.dmdirc.config.prefs.PreferencesSetting;
34 34
 import com.dmdirc.config.prefs.PreferencesType;
35 35
 import com.dmdirc.interfaces.ActionListener;
36 36
 import com.dmdirc.parser.irc.ChannelClientInfo;
37
-import com.dmdirc.parser.irc.ChannelInfo;
37
+import com.dmdirc.parser.irc.IRCChannelInfo;
38 38
 import com.dmdirc.parser.irc.ClientInfo;
39 39
 import com.dmdirc.plugins.Plugin;
40 40
 import com.dmdirc.ui.messages.ColourManager;
@@ -67,7 +67,7 @@ public final class NickColourPlugin extends Plugin implements ActionListener {
67 67
     public void processEvent(final ActionType type, final StringBuffer format,
68 68
             final Object... arguments) {
69 69
         if (type.equals(CoreActionType.CHANNEL_GOTNAMES)) {
70
-            final ChannelInfo chanInfo = ((Channel) arguments[0]).getChannelInfo();
70
+            final IRCChannelInfo chanInfo = ((Channel) arguments[0]).getChannelInfo();
71 71
             final String network = ((Channel) arguments[0]).getServer().getNetwork();
72 72
             
73 73
             for (ChannelClientInfo client : chanInfo.getChannelClients()) {

+ 2
- 2
src/com/dmdirc/addons/windowstatus/WindowStatusPlugin.java Dosyayı Görüntüle

@@ -39,7 +39,7 @@ import com.dmdirc.config.prefs.PreferencesType;
39 39
 import com.dmdirc.interfaces.ActionListener;
40 40
 import com.dmdirc.interfaces.ConfigChangeListener;
41 41
 import com.dmdirc.parser.irc.ChannelClientInfo;
42
-import com.dmdirc.parser.irc.ChannelInfo;
42
+import com.dmdirc.parser.irc.IRCChannelInfo;
43 43
 import com.dmdirc.parser.irc.ClientInfo;
44 44
 import com.dmdirc.plugins.Plugin;
45 45
 import com.dmdirc.ui.interfaces.InputWindow;
@@ -125,7 +125,7 @@ public final class WindowStatusPlugin extends Plugin implements ActionListener,
125 125
 			textString.append(frame.getName());
126 126
 		} else if (current instanceof Channel) {
127 127
 			final Channel frame = (Channel) current;
128
-			final ChannelInfo chan = frame.getChannelInfo();
128
+			final IRCChannelInfo chan = frame.getChannelInfo();
129 129
 			final Map<Long, String> names = new Hashtable<Long, String>();
130 130
 			final Map<Long, Integer> types = new Hashtable<Long, Integer>();
131 131
 

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/Mode.java Dosyayı Görüntüle

@@ -29,7 +29,7 @@ import com.dmdirc.commandparser.commands.ChannelCommand;
29 29
 import com.dmdirc.commandparser.CommandManager;
30 30
 import com.dmdirc.commandparser.commands.ExternalCommand;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32
-import com.dmdirc.parser.irc.ChannelInfo;
32
+import com.dmdirc.parser.irc.IRCChannelInfo;
33 33
 import com.dmdirc.ui.input.AdditionalTabTargets;
34 34
 import com.dmdirc.ui.input.TabCompletionType;
35 35
 import com.dmdirc.ui.interfaces.InputWindow;
@@ -54,7 +54,7 @@ public final class Mode extends ChannelCommand implements IntelligentCommand,
54 54
     @Override
55 55
     public void execute(final InputWindow origin, final Server server,
56 56
             final Channel channel, final boolean isSilent, final CommandArguments args) {
57
-        final ChannelInfo cChannel = channel.getChannelInfo();
57
+        final IRCChannelInfo cChannel = channel.getChannelInfo();
58 58
 
59 59
         if (args.getArguments().length == 0) {
60 60
             sendLine(origin, isSilent, "channelModeDiscovered", cChannel.getModeStr(), cChannel);

+ 2
- 2
src/com/dmdirc/commandparser/commands/channel/ShowTopic.java Dosyayı Görüntüle

@@ -28,7 +28,7 @@ import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.commandparser.commands.ChannelCommand;
29 29
 import com.dmdirc.commandparser.CommandManager;
30 30
 import com.dmdirc.commandparser.commands.ExternalCommand;
31
-import com.dmdirc.parser.irc.ChannelInfo;
31
+import com.dmdirc.parser.irc.IRCChannelInfo;
32 32
 import com.dmdirc.parser.irc.ClientInfo;
33 33
 import com.dmdirc.ui.interfaces.InputWindow;
34 34
 
@@ -50,7 +50,7 @@ public final class ShowTopic extends ChannelCommand implements ExternalCommand {
50 50
     public void execute(final InputWindow origin, final Server server,
51 51
             final Channel channel, final boolean isSilent, final CommandArguments args) {
52 52
         if (args.getArguments().length == 0) {
53
-            final ChannelInfo cChannel = channel.getChannelInfo();
53
+            final IRCChannelInfo cChannel = channel.getChannelInfo();
54 54
 
55 55
             if (cChannel.getTopic().isEmpty()) {
56 56
                 sendLine(origin, isSilent, "channelNoTopic", cChannel);

+ 34
- 0
src/com/dmdirc/parser/interfaces/ChannelInfo.java Dosyayı Görüntüle

@@ -0,0 +1,34 @@
1
+/*
2
+ * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.interfaces;
24
+
25
+/**
26
+ * Holds information about a channel and allows various operations to be
27
+ * performed on the channel.
28
+ *
29
+ * @since 0.6.3m2
30
+ * @author chris
31
+ */
32
+public interface ChannelInfo {
33
+
34
+}

+ 9
- 0
src/com/dmdirc/parser/interfaces/Parser.java Dosyayı Görüntüle

@@ -26,6 +26,7 @@ package com.dmdirc.parser.interfaces;
26 26
  * A parser connects to a back-end chat system and handles all communication
27 27
  * with it.
28 28
  *
29
+ * @since 0.6.3m2
29 30
  * @author chris
30 31
  */
31 32
 public interface Parser extends Runnable {
@@ -45,6 +46,14 @@ public interface Parser extends Runnable {
45 46
      */
46 47
     void joinChannel(String channel);
47 48
 
49
+    /**
50
+     * Retrieves a channel information object for the specified channel.
51
+     *
52
+     * @param channel Name of the channel to retrieve an information object for
53
+     * @return A corresponding channel info object
54
+     */
55
+    ChannelInfo getChannel(String channel);
56
+
48 57
     /**
49 58
      * Set the current Value of bindIP.
50 59
      *

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelActionListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -51,7 +51,7 @@ public interface ChannelActionListener extends CallbackInterface {
51 51
 	 */
52 52
 	void onChannelAction(
53 53
             @FakableSource Parser tParser,
54
-            @FakableSource ChannelInfo cChannel,
54
+            @FakableSource IRCChannelInfo cChannel,
55 55
             @FakableArgument ChannelClientInfo cChannelClient,
56 56
             String sMessage,
57 57
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelCtcpListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -50,7 +50,7 @@ public interface ChannelCtcpListener extends CallbackInterface {
50 50
 	 * @see com.dmdirc.parser.irc.ProcessMessage#callChannelCTCP
51 51
 	 */
52 52
 	void onChannelCTCP(@FakableSource Parser tParser,
53
-            @FakableSource ChannelInfo cChannel,
53
+            @FakableSource IRCChannelInfo cChannel,
54 54
             @FakableArgument ChannelClientInfo cChannelClient,
55 55
             String sType, String sMessage,
56 56
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelCtcpReplyListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -50,7 +50,7 @@ public interface ChannelCtcpReplyListener extends CallbackInterface {
50 50
 	 * @see com.dmdirc.parser.irc.ProcessMessage#callChannelCTCPReply
51 51
 	 */
52 52
 	void onChannelCTCPReply(@FakableSource Parser tParser,
53
-            @FakableSource ChannelInfo cChannel,
53
+            @FakableSource IRCChannelInfo cChannel,
54 54
             @FakableArgument ChannelClientInfo cChannelClient,
55 55
             String sType, String sMessage,
56 56
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelJoinListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
29 29
 
30 30
 /** 
@@ -42,5 +42,5 @@ public interface ChannelJoinListener extends CallbackInterface {
42 42
 	 * @param cChannelClient ChannelClient object for new person
43 43
 	 * @see com.dmdirc.parser.irc.ProcessJoin#callChannelJoin
44 44
 	 */
45
-	void onChannelJoin(Parser tParser, ChannelInfo cChannel, ChannelClientInfo cChannelClient);
45
+	void onChannelJoin(Parser tParser, IRCChannelInfo cChannel, ChannelClientInfo cChannelClient);
46 46
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelKickListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -48,7 +48,7 @@ public interface ChannelKickListener extends CallbackInterface {
48 48
 	 * @see com.dmdirc.parser.irc.ProcessKick#callChannelKick
49 49
 	 */
50 50
 	void onChannelKick(@FakableSource Parser tParser,
51
-            @FakableSource ChannelInfo cChannel,
51
+            @FakableSource IRCChannelInfo cChannel,
52 52
             ChannelClientInfo cKickedClient,
53 53
             @FakableArgument ChannelClientInfo cKickedByClient,
54 54
             String sReason,

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelListModeListener.java Dosyayı Görüntüle

@@ -23,7 +23,7 @@
23 23
 package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26
-import com.dmdirc.parser.irc.ChannelInfo;
26
+import com.dmdirc.parser.irc.IRCChannelInfo;
27 27
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 28
 
29 29
 /**
@@ -40,5 +40,5 @@ public interface ChannelListModeListener extends CallbackInterface {
40 40
 	 * @param cChannel Channel which the ListModes reply is for
41 41
 	 * @see com.dmdirc.parser.irc.ProcessListModes#callChannelGotListModes
42 42
 	 */
43
-	void onChannelGotListModes(Parser tParser, ChannelInfo cChannel);
43
+	void onChannelGotListModes(Parser tParser, IRCChannelInfo cChannel);
44 44
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelMessageListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -49,7 +49,7 @@ public interface ChannelMessageListener extends CallbackInterface {
49 49
 	 * @see com.dmdirc.parser.irc.ProcessMessage#callChannelMessage
50 50
 	 */
51 51
 	void onChannelMessage(@FakableSource Parser tParser,
52
-            @FakableSource ChannelInfo cChannel,
52
+            @FakableSource IRCChannelInfo cChannel,
53 53
             @FakableArgument ChannelClientInfo cChannelClient,
54 54
             String sMessage,
55 55
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelModeChangeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -49,7 +49,7 @@ public interface ChannelModeChangeListener extends CallbackInterface {
49 49
 	 * @see com.dmdirc.parser.irc.ProcessMode#callChannelModeChanged
50 50
 	 */
51 51
 	void onChannelModeChanged(@FakableSource Parser tParser,
52
-            @FakableSource ChannelInfo cChannel,
52
+            @FakableSource IRCChannelInfo cChannel,
53 53
             @FakableArgument ChannelClientInfo cChannelClient,
54 54
             @FakableSource String sHost,
55 55
             String sModes);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelModeMessageListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -51,7 +51,7 @@ public interface ChannelModeMessageListener extends CallbackInterface {
51 51
 	 */
52 52
 	void onChannelModeMessage(@FakableSource Parser tParser,
53 53
             char prefix,
54
-            @FakableSource ChannelInfo cChannel,
54
+            @FakableSource IRCChannelInfo cChannel,
55 55
             @FakableArgument ChannelClientInfo cChannelClient,
56 56
             String sMessage,
57 57
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelModeNoticeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -51,7 +51,7 @@ public interface ChannelModeNoticeListener extends CallbackInterface {
51 51
 	 */
52 52
 	void onChannelModeNotice(@FakableSource Parser tParser,
53 53
             char prefix,
54
-            @FakableSource ChannelInfo cChannel,
54
+            @FakableSource IRCChannelInfo cChannel,
55 55
             @FakableArgument ChannelClientInfo cChannelClient,
56 56
             String sMessage,
57 57
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelNamesListener.java Dosyayı Görüntüle

@@ -23,7 +23,7 @@
23 23
 package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26
-import com.dmdirc.parser.irc.ChannelInfo;
26
+import com.dmdirc.parser.irc.IRCChannelInfo;
27 27
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 28
 
29 29
 /**
@@ -38,5 +38,5 @@ public interface ChannelNamesListener extends CallbackInterface {
38 38
 	 * @param cChannel Channel which the names reply is for
39 39
 	 * @see com.dmdirc.parser.irc.ProcessNames#callChannelGotNames
40 40
 	 */
41
-	void onChannelGotNames(Parser tParser, ChannelInfo cChannel);
41
+	void onChannelGotNames(Parser tParser, IRCChannelInfo cChannel);
42 42
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelNickChangeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
29 29
 
30 30
 /** 
@@ -43,5 +43,5 @@ public interface ChannelNickChangeListener extends CallbackInterface {
43 43
 	 * @param sOldNick Nickname before change
44 44
 	 * @see com.dmdirc.parser.irc.ProcessNick#callChannelNickChanged
45 45
 	 */
46
-	 void onChannelNickChanged(Parser tParser, ChannelInfo cChannel, ChannelClientInfo cChannelClient, String sOldNick);
46
+	 void onChannelNickChanged(Parser tParser, IRCChannelInfo cChannel, ChannelClientInfo cChannelClient, String sOldNick);
47 47
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelNonUserModeChangeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -48,7 +48,7 @@ public interface ChannelNonUserModeChangeListener extends CallbackInterface {
48 48
 	 * @param sModes String showing the exact mode change parsed. (Not including user modes)
49 49
 	 */
50 50
 	void onChannelNonUserModeChanged(@FakableSource Parser tParser,
51
-            @FakableSource ChannelInfo cChannel,
51
+            @FakableSource IRCChannelInfo cChannel,
52 52
             @FakableArgument ChannelClientInfo cChannelClient,
53 53
             @FakableSource String sHost,
54 54
             String sModes);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelNoticeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -49,7 +49,7 @@ public interface ChannelNoticeListener extends CallbackInterface {
49 49
 	 * @see com.dmdirc.parser.irc.ProcessMessage#callChannelNotice
50 50
 	 */
51 51
 	void onChannelNotice(@FakableSource Parser tParser,
52
-            @FakableSource ChannelInfo cChannel,
52
+            @FakableSource IRCChannelInfo cChannel,
53 53
             @FakableArgument ChannelClientInfo cChannelClient,
54 54
             String sMessage,
55 55
             @FakableSource String sHost);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelOtherAwayStateListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
29 29
 
30 30
 /**
@@ -41,5 +41,5 @@ public interface ChannelOtherAwayStateListener extends CallbackInterface {
41 41
 	 * @param state Away State (true if away, false if here)
42 42
 	 * @see com.dmdirc.parser.irc.ProcessAway#callChannelAwayStateOther
43 43
 	 */
44
-	void onChannelAwayStateOther(Parser tParser, ChannelInfo channel, ChannelClientInfo channelClient, boolean state);
44
+	void onChannelAwayStateOther(Parser tParser, IRCChannelInfo channel, ChannelClientInfo channelClient, boolean state);
45 45
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelPartListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
29 29
 
30 30
 /** 
@@ -43,5 +43,5 @@ public interface ChannelPartListener extends CallbackInterface {
43 43
 	 * @param sReason Reason given for parting (May be "")
44 44
 	 * @see com.dmdirc.parser.irc.ProcessPart#callChannelPart
45 45
 	 */
46
-	void onChannelPart(Parser tParser, ChannelInfo cChannel, ChannelClientInfo cChannelClient, String sReason);
46
+	void onChannelPart(Parser tParser, IRCChannelInfo cChannel, ChannelClientInfo cChannelClient, String sReason);
47 47
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelQuitListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
29 29
 
30 30
 /** 
@@ -43,5 +43,5 @@ public interface ChannelQuitListener extends CallbackInterface {
43 43
 	 * @param sReason Quit reason
44 44
 	 * @see com.dmdirc.parser.irc.ProcessQuit#callChannelQuit
45 45
 	 */
46
-	void onChannelQuit(Parser tParser, ChannelInfo cChannel, ChannelClientInfo cChannelClient, String sReason);
46
+	void onChannelQuit(Parser tParser, IRCChannelInfo cChannel, ChannelClientInfo cChannelClient, String sReason);
47 47
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelSelfJoinListener.java Dosyayı Görüntüle

@@ -23,7 +23,7 @@
23 23
 package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26
-import com.dmdirc.parser.irc.ChannelInfo;
26
+import com.dmdirc.parser.irc.IRCChannelInfo;
27 27
 
28 28
 /** 
29 29
  * Called When we join a channel.
@@ -38,5 +38,5 @@ public interface ChannelSelfJoinListener extends CallbackInterface {
38 38
 	 * @param cChannel Channel Object
39 39
 	 * @see com.dmdirc.parser.irc.ProcessJoin#callChannelSelfJoin
40 40
 	 */
41
-	void onChannelSelfJoin(Parser tParser, ChannelInfo cChannel);
41
+	void onChannelSelfJoin(Parser tParser, IRCChannelInfo cChannel);
42 42
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelSingleModeChangeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -48,7 +48,7 @@ public interface ChannelSingleModeChangeListener extends CallbackInterface {
48 48
 	 * @param sModes String parsed (ie "+m" or "+k moo"
49 49
 	 */
50 50
 	void onChannelSingleModeChanged(@FakableSource Parser tParser,
51
-            @FakableSource ChannelInfo cChannel,
51
+            @FakableSource IRCChannelInfo cChannel,
52 52
             @FakableArgument ChannelClientInfo cChannelClient,
53 53
             @FakableSource String sHost,
54 54
             String sModes);

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelTopicListener.java Dosyayı Görüntüle

@@ -23,7 +23,7 @@
23 23
 package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26
-import com.dmdirc.parser.irc.ChannelInfo;
26
+import com.dmdirc.parser.irc.IRCChannelInfo;
27 27
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 28
 
29 29
 /** 
@@ -41,5 +41,5 @@ public interface ChannelTopicListener extends CallbackInterface {
41 41
 	 * @param bIsJoinTopic True when getting topic on join, false if set by user/server
42 42
 	 * @see com.dmdirc.parser.irc.ProcessTopic#callChannelTopic
43 43
 	 */
44
-	void onChannelTopic(Parser tParser, ChannelInfo cChannel, boolean bIsJoinTopic);
44
+	void onChannelTopic(Parser tParser, IRCChannelInfo cChannel, boolean bIsJoinTopic);
45 45
 }

+ 2
- 2
src/com/dmdirc/parser/interfaces/callbacks/ChannelUserModeChangeListener.java Dosyayı Görüntüle

@@ -24,7 +24,7 @@ package com.dmdirc.parser.interfaces.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27
-import com.dmdirc.parser.irc.ChannelInfo;
27
+import com.dmdirc.parser.irc.IRCChannelInfo;
28 28
 import com.dmdirc.parser.irc.callbacks.FakableArgument;
29 29
 import com.dmdirc.parser.irc.callbacks.FakableSource;
30 30
 import com.dmdirc.parser.irc.callbacks.SpecificCallback;
@@ -48,7 +48,7 @@ public interface ChannelUserModeChangeListener extends CallbackInterface {
48 48
 	 * @see com.dmdirc.parser.irc.ProcessMode#callChannelUserModeChanged
49 49
 	 */
50 50
 	void onChannelUserModeChanged(@FakableSource Parser tParser,
51
-            @FakableSource ChannelInfo cChannel,
51
+            @FakableSource IRCChannelInfo cChannel,
52 52
             ChannelClientInfo cChangedClient,
53 53
             @FakableArgument ChannelClientInfo cSetByClient,
54 54
             @FakableSource String sHost,

+ 3
- 3
src/com/dmdirc/parser/irc/ChannelClientInfo.java Dosyayı Görüntüle

@@ -40,7 +40,7 @@ public class ChannelClientInfo {
40 40
 	/** Reference to the parser object that owns this channelclient, Used for modes. */
41 41
 	private final IRCParser myParser;
42 42
 	/** Reference to the channel object that owns this channelclient. */
43
-	private final ChannelInfo myChannel;
43
+	private final IRCChannelInfo myChannel;
44 44
 	/** A Map to allow applications to attach misc data to this object */
45 45
 	private Map myMap;
46 46
 	
@@ -51,7 +51,7 @@ public class ChannelClientInfo {
51 51
 	 * @param client Client that this channelclient represents
52 52
 	 * @param channel Channel that owns this channelclient
53 53
 	 */	
54
-	public ChannelClientInfo(final IRCParser tParser, final ClientInfo client, final ChannelInfo channel) {
54
+	public ChannelClientInfo(final IRCParser tParser, final ClientInfo client, final IRCChannelInfo channel) {
55 55
 		myMap = new HashMap<Object, Object>();
56 56
 		myParser = tParser;
57 57
 		cClient = client;
@@ -90,7 +90,7 @@ public class ChannelClientInfo {
90 90
 	 *
91 91
 	 * @return Channel object that owns this ChannelClient
92 92
 	 */
93
-	public ChannelInfo getChannel() { return myChannel; }
93
+	public IRCChannelInfo getChannel() { return myChannel; }
94 94
 	/**
95 95
 	 * Get the nickname of the client object represented by this channelclient.
96 96
 	 *

src/com/dmdirc/parser/irc/ChannelInfo.java → src/com/dmdirc/parser/irc/IRCChannelInfo.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import java.util.ArrayList;
26 27
 import java.util.Hashtable;
27 28
 import java.util.HashMap;
@@ -37,7 +38,7 @@ import java.util.Queue;
37 38
  * @author Chris Smith
38 39
  * @see IRCParser
39 40
  */
40
-public class ChannelInfo {
41
+public class IRCChannelInfo implements ChannelInfo {
41 42
 	/**
42 43
 	 * Boolean repreenting the status of names requests.
43 44
 	 * When this is false, any new names reply will cause current known channelclients to be removed.
@@ -93,7 +94,7 @@ public class ChannelInfo {
93 94
 	 * @param tParser Refernce to parser that owns this channelclient (used for modes)	 
94 95
 	 * @param name Channel name.
95 96
 	 */
96
-	public ChannelInfo(final IRCParser tParser, final String name) {
97
+	public IRCChannelInfo(final IRCParser tParser, final String name) {
97 98
 		myMap = new HashMap<Object, Object>();
98 99
 		myParser = tParser;
99 100
 		sName = name;

+ 18
- 21
src/com/dmdirc/parser/irc/IRCParser.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.Parser;
26 27
 import com.dmdirc.parser.interfaces.callbacks.ConnectErrorListener;
27 28
 import com.dmdirc.parser.interfaces.callbacks.DataInListener;
@@ -206,7 +207,7 @@ class IRCParser implements Parser, Runnable {
206 207
 	/** Hashtable storing all known clients based on nickname (in lowercase). */
207 208
 	private final Map<String, ClientInfo> hClientList = new Hashtable<String, ClientInfo>();
208 209
 	/** Hashtable storing all known channels based on chanel name (inc prefix - in lowercase). */
209
-	private final Map<String, ChannelInfo> hChannelList = new Hashtable<String, ChannelInfo>();
210
+	private final Map<String, IRCChannelInfo> hChannelList = new Hashtable<String, IRCChannelInfo>();
210 211
 	/** Reference to the ClientInfo object that references ourself. */
211 212
 	private ClientInfo cMyself = new ClientInfo(this, "myself").setFake(true);
212 213
 	/** Hashtable storing all information gathered from 005. */
@@ -895,16 +896,12 @@ class IRCParser implements Parser, Runnable {
895 896
 		else { return new ClientInfo(this, sHost).setFake(true); }
896 897
 	}
897 898
 
898
-	/**
899
-	 * Get the ChannelInfo object for a channel.
900
-	 *
901
-	 * @param sWhat This is the name of the channel.
902
-	 * @return ChannelInfo Object for the channel, or null
903
-	 */
904
-	public ChannelInfo getChannelInfo(String sWhat) {
899
+	/** {@inheritDoc} */
900
+        @Override
901
+	public ChannelInfo getChannel(String channel) {
905 902
 		synchronized (hChannelList) {
906
-			sWhat = getIRCStringConverter().toLowerCase(sWhat);
907
-			if (hChannelList.containsKey(sWhat)) { return hChannelList.get(sWhat); } else { return null; }
903
+			channel = getIRCStringConverter().toLowerCase(channel);
904
+			if (hChannelList.containsKey(channel)) { return hChannelList.get(channel); } else { return null; }
908 905
 		}
909 906
 	}
910 907
 
@@ -943,7 +940,7 @@ class IRCParser implements Parser, Runnable {
943 940
 			// as the ircd will only reply once.
944 941
 			final LinkedList<Character> foundModes = new LinkedList<Character>();
945 942
 
946
-			final ChannelInfo channel = getChannelInfo(newLine[1]);
943
+			final ChannelInfo channel = getChannel(newLine[1]);
947 944
 			if (channel != null) {
948 945
 				final Queue<Character> listModeQueue = channel.getListModeQueue();
949 946
 				for (int i = 0; i < newLine[2].length() ; ++i) {
@@ -1484,7 +1481,7 @@ class IRCParser implements Parser, Runnable {
1484 1481
 	 * @param sReason Reason for leaving (Nothing sent if sReason is "")
1485 1482
 	 */
1486 1483
 	public void partChannel(final String sChannelName, final String sReason) {
1487
-		if (getChannelInfo(sChannelName) == null) { return; }
1484
+		if (getChannel(sChannelName) == null) { return; }
1488 1485
 		if (sReason.isEmpty()) {
1489 1486
 			sendString("PART " + sChannelName);
1490 1487
 		} else {
@@ -1675,11 +1672,11 @@ class IRCParser implements Parser, Runnable {
1675 1672
 	/** {@inheritDoc} */
1676 1673
     @Override
1677 1674
 	public void disconnect(final String message) {
1678
-                if (currentSocketState == SocketState.OPEN) {
1679
-                        currentSocketState = SocketState.CLOSING;
1680
-                        if (got001) { quit(message); }
1681
-                }
1682
-
1675
+                if (currentSocketState == SocketState.OPEN) {
1676
+                        currentSocketState = SocketState.CLOSING;
1677
+                        if (got001) { quit(message); }
1678
+                }
1679
+
1683 1680
 		try {
1684 1681
 			if (socket != null) { socket.close(); }
1685 1682
 		} catch (IOException e) {
@@ -1709,7 +1706,7 @@ class IRCParser implements Parser, Runnable {
1709 1706
 		// Check its not ourself (PM recieved before 005)
1710 1707
 		if (getIRCStringConverter().equalsIgnoreCase(getMyNickname(), sChannelName)) { return false; }
1711 1708
 		// Check if we are already on this channel
1712
-		if (getChannelInfo(sChannelName) != null) { return true; }
1709
+		if (getChannel(sChannelName) != null) { return true; }
1713 1710
 		// Check if we know of any valid chan prefixes
1714 1711
 		if (hChanPrefix.isEmpty()) {
1715 1712
 			// We don't. Lets check against RFC2811-Specified channel types
@@ -2082,7 +2079,7 @@ class IRCParser implements Parser, Runnable {
2082 2079
 	 *
2083 2080
 	 * @param channel Channel to add
2084 2081
 	 */
2085
-	public void addChannel(final ChannelInfo channel) {
2082
+	public void addChannel(final IRCChannelInfo channel) {
2086 2083
 		synchronized (hChannelList) {
2087 2084
 			hChannelList.put(getIRCStringConverter().toLowerCase(channel.getName()), channel);
2088 2085
 		}
@@ -2093,7 +2090,7 @@ class IRCParser implements Parser, Runnable {
2093 2090
 	 *
2094 2091
 	 * @param channel Channel to remove
2095 2092
 	 */
2096
-	public void removeChannel(final ChannelInfo channel) {
2093
+	public void removeChannel(final IRCChannelInfo channel) {
2097 2094
 		synchronized (hChannelList) {
2098 2095
 			hChannelList.remove(getIRCStringConverter().toLowerCase(channel.getName()));
2099 2096
 		}
@@ -2115,7 +2112,7 @@ class IRCParser implements Parser, Runnable {
2115 2112
 	 *
2116 2113
 	 * @return Known channels as a collection
2117 2114
 	 */
2118
-	public Collection<ChannelInfo> getChannels() {
2115
+	public Collection<IRCChannelInfo> getChannels() {
2119 2116
 		synchronized (hChannelList) {
2120 2117
 			return hChannelList.values();
2121 2118
 		}

+ 4
- 3
src/com/dmdirc/parser/irc/IRCProcessor.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.irc.callbacks.CallbackManager;
26 27
 
27 28
 /**
@@ -109,11 +110,11 @@ public abstract class IRCProcessor {
109 110
 	/**
110 111
 	 * Get the ChannelInfo object for a channel.
111 112
 	 *
112
-	 * @param sWhat This is the name of the channel.
113
+	 * @param name This is the name of the channel.
113 114
 	 * @return ChannelInfo Object for the channel, or null
114 115
 	 */
115
-	protected final ChannelInfo getChannelInfo(final String sWhat) {
116
-		return myParser.getChannelInfo(sWhat);
116
+	protected final ChannelInfo getChannel(final String name) {
117
+		return myParser.getChannel(name);
117 118
 	}
118 119
 	
119 120
 	/**

+ 6
- 6
src/com/dmdirc/parser/irc/ProcessJoin.java Dosyayı Görüntüle

@@ -40,7 +40,7 @@ public class ProcessJoin extends IRCProcessor {
40 40
 	public void process(final String sParam, final String[] token) {
41 41
 		if (sParam.equals("329")) {
42 42
 			if (token.length < 5) { return; }
43
-			ChannelInfo iChannel = myParser.getChannelInfo(token[3]);
43
+			IRCChannelInfo iChannel = myParser.getChannel(token[3]);
44 44
 			if (iChannel != null) {
45 45
 				try {
46 46
 					iChannel.setCreateTime(Integer.parseInt(token[4]));
@@ -51,11 +51,11 @@ public class ProcessJoin extends IRCProcessor {
51 51
 			Byte nTemp;
52 52
 			if (token.length < 3) { return; }
53 53
 			ClientInfo iClient;
54
-			ChannelInfo iChannel;
54
+			IRCChannelInfo iChannel;
55 55
 			ChannelClientInfo iChannelClient;
56 56
 			
57 57
 			iClient = myParser.getClientInfo(token[0]);
58
-			iChannel = myParser.getChannelInfo(token[token.length-1]);
58
+			iChannel = myParser.getChannel(token[token.length-1]);
59 59
 			
60 60
 			if (iClient == null) { 
61 61
 				iClient = new ClientInfo(myParser, token[0]);
@@ -89,7 +89,7 @@ public class ProcessJoin extends IRCProcessor {
89 89
 			//if (iClient != myParser.getMyself()) {
90 90
 				// callErrorInfo(new ParserError(ParserError.ERROR_WARNING, "Got join for channel ("+token[token.length-1]+") that I am not on. [Me: "+myParser.getMyself()+"]", myParser.getLastLine()));
91 91
 			//}
92
-			iChannel = new ChannelInfo(myParser, token[token.length-1]);
92
+			iChannel = new IRCChannelInfo(myParser, token[token.length-1]);
93 93
 			// Add ourself to the channel, this will be overridden by the NAMES reply
94 94
 			iChannel.addClient(iClient);
95 95
 			myParser.addChannel(iChannel);
@@ -108,7 +108,7 @@ public class ProcessJoin extends IRCProcessor {
108 108
 	 * @param cChannelClient ChannelClient object for new person
109 109
 	 * @return true if a method was called, false otherwise
110 110
 	 */
111
-	protected boolean callChannelJoin(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient) {
111
+	protected boolean callChannelJoin(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient) {
112 112
 		return getCallbackManager().getCallbackType(ChannelJoinListener.class).call(cChannel, cChannelClient);
113 113
 	}
114 114
 	
@@ -119,7 +119,7 @@ public class ProcessJoin extends IRCProcessor {
119 119
 	 * @param cChannel Channel Object
120 120
 	 * @return true if a method was called, false otherwise
121 121
 	 */
122
-	protected boolean callChannelSelfJoin(final ChannelInfo cChannel) {
122
+	protected boolean callChannelSelfJoin(final IRCChannelInfo cChannel) {
123 123
 		return  getCallbackManager().getCallbackType(ChannelSelfJoinListener.class).call(cChannel);
124 124
 	}
125 125
 	

+ 3
- 2
src/com/dmdirc/parser/irc/ProcessKick.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelKickListener;
26 27
 
27 28
 /**
@@ -46,7 +47,7 @@ public class ProcessKick extends IRCProcessor {
46 47
 		
47 48
 		iClient = getClientInfo(token[3]);
48 49
 		iKicker = getClientInfo(token[0]);
49
-		iChannel = getChannelInfo(token[2]);
50
+		iChannel = getChannel(token[2]);
50 51
 		
51 52
 		if (iClient == null) { return; }
52 53
 		
@@ -89,7 +90,7 @@ public class ProcessKick extends IRCProcessor {
89 90
 	 * @param sKickedByHost Hostname of Kicker (or servername)
90 91
 	 * @return true if a method was called, false otherwise
91 92
 	 */
92
-	protected boolean callChannelKick(ChannelInfo cChannel, ChannelClientInfo cKickedClient, ChannelClientInfo cKickedByClient, String sReason, String sKickedByHost) {
93
+	protected boolean callChannelKick(IRCChannelInfo cChannel, ChannelClientInfo cKickedClient, ChannelClientInfo cKickedByClient, String sReason, String sKickedByHost) {
93 94
 		return getCallbackManager().getCallbackType(ChannelKickListener.class).call(cChannel, cKickedClient, cKickedByClient, sReason, sKickedByHost);
94 95
 	}
95 96
 	

+ 3
- 2
src/com/dmdirc/parser/irc/ProcessListModes.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelListModeListener;
26 27
 import java.util.List;
27 28
 import java.util.LinkedList;
@@ -40,7 +41,7 @@ public class ProcessListModes extends IRCProcessor {
40 41
 	@SuppressWarnings("unchecked")
41 42
 	@Override
42 43
 	public void process(String sParam, String[] token) {
43
-		ChannelInfo channel = getChannelInfo(token[3]);
44
+		ChannelInfo channel = getChannel(token[3]);
44 45
 		String thisIRCD = myParser.getIRCD(true).toLowerCase();
45 46
 		String item = "";
46 47
 		String owner = "";
@@ -227,7 +228,7 @@ public class ProcessListModes extends IRCProcessor {
227 228
 	 * @param cChannel Channel which the ListModes reply is for
228 229
 	 * @return true if a method was called, false otherwise
229 230
 	 */
230
-	protected boolean callChannelGotListModes(ChannelInfo cChannel) {
231
+	protected boolean callChannelGotListModes(IRCChannelInfo cChannel) {
231 232
 		return getCallbackManager().getCallbackType(ChannelListModeListener.class).call(cChannel);
232 233
 	}
233 234
 	

+ 9
- 8
src/com/dmdirc/parser/irc/ProcessMessage.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelActionListener;
26 27
 import com.dmdirc.parser.interfaces.callbacks.ChannelCtcpListener;
27 28
 import com.dmdirc.parser.interfaces.callbacks.ChannelCtcpReplyListener;
@@ -161,7 +162,7 @@ public class ProcessMessage extends IRCProcessor {
161 162
 		final String targetName = (hasModePrefix) ? token[2].substring(1) : token[2];
162 163
 		
163 164
 		if (isValidChannelName(targetName)) {
164
-			iChannel = getChannelInfo(targetName);
165
+			iChannel = getChannel(targetName);
165 166
 			if (iChannel == null) {
166 167
 				// callErrorInfo(new ParserError(ParserError.ERROR_WARNING, "Got message for channel ("+targetName+") that I am not on.", myParser.getLastLine()));
167 168
 				return;
@@ -238,7 +239,7 @@ public class ProcessMessage extends IRCProcessor {
238 239
 	 * @param sHost Hostname of sender (or servername)
239 240
 	 * @return true if a method was called, false otherwise
240 241
 	 */
241
-	protected boolean callChannelAction(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
242
+	protected boolean callChannelAction(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
242 243
 		return getCallbackManager().getCallbackType(ChannelActionListener.class).call(cChannel, cChannelClient, sMessage, sHost);
243 244
 	}
244 245
 	
@@ -253,7 +254,7 @@ public class ProcessMessage extends IRCProcessor {
253 254
 	 * @param sHost Hostname of sender (or servername)
254 255
 	 * @return true if a method was called, false otherwise
255 256
 	 */
256
-	protected boolean callChannelCTCP(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
257
+	protected boolean callChannelCTCP(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
257 258
 		return getCallbackManager().getCallbackType(ChannelCtcpListener.class).call(cChannel, cChannelClient, sType, sMessage, sHost);
258 259
 	}
259 260
 
@@ -268,7 +269,7 @@ public class ProcessMessage extends IRCProcessor {
268 269
 	 * @param sHost Hostname of sender (or servername)
269 270
 	 * @return true if a method was called, false otherwise
270 271
 	 */
271
-	protected boolean callChannelCTCPReply(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
272
+	protected boolean callChannelCTCPReply(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
272 273
 		return getCallbackManager().getCallbackType(ChannelCtcpReplyListener.class).call(cChannel, cChannelClient, sType, sMessage, sHost);
273 274
 	}
274 275
 	
@@ -282,7 +283,7 @@ public class ProcessMessage extends IRCProcessor {
282 283
 	 * @param sHost Hostname of sender (or servername)
283 284
 	 * @return true if a method was called, false otherwise
284 285
 	 */
285
-	protected boolean callChannelMessage(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
286
+	protected boolean callChannelMessage(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
286 287
 		return getCallbackManager().getCallbackType(ChannelMessageListener.class).call(cChannel, cChannelClient, sMessage, sHost);
287 288
 	}
288 289
 	
@@ -296,7 +297,7 @@ public class ProcessMessage extends IRCProcessor {
296 297
 	 * @param sHost Hostname of sender (or servername)
297 298
 	 * @return true if a method was called, false otherwise
298 299
 	 */
299
-	protected boolean callChannelNotice(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
300
+	protected boolean callChannelNotice(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
300 301
 		return getCallbackManager().getCallbackType(ChannelNoticeListener.class).call(cChannel, cChannelClient, sMessage, sHost);
301 302
 	}
302 303
 	
@@ -311,7 +312,7 @@ public class ProcessMessage extends IRCProcessor {
311 312
 	 * @param sHost Hostname of sender (or servername)
312 313
 	 * @return true if a method was called, false otherwise
313 314
 	 */
314
-	protected boolean callChannelModeNotice(final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
315
+	protected boolean callChannelModeNotice(final char prefix, final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
315 316
 		return getCallbackManager().getCallbackType(ChannelModeNoticeListener.class).call(prefix, cChannel, cChannelClient, sMessage, sHost);
316 317
 	}
317 318
 	
@@ -326,7 +327,7 @@ public class ProcessMessage extends IRCProcessor {
326 327
 	 * @param sHost Hostname of sender (or servername)
327 328
 	 * @return true if a method was called, false otherwise
328 329
 	 */
329
-	protected boolean callChannelModeMessage(final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
330
+	protected boolean callChannelModeMessage(final char prefix, final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
330 331
 		return getCallbackManager().getCallbackType(ChannelModeMessageListener.class).call(prefix, cChannel, cChannelClient, sMessage, sHost);
331 332
 	}
332 333
 	

+ 4
- 3
src/com/dmdirc/parser/irc/ProcessMode.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelModeChangeListener;
26 27
 import com.dmdirc.parser.interfaces.callbacks.ChannelNonUserModeChangeListener;
27 28
 import com.dmdirc.parser.interfaces.callbacks.ChannelSingleModeChangeListener;
@@ -101,7 +102,7 @@ public class ProcessMode extends IRCProcessor {
101 102
 			cbNonUser = getCallbackManager().getCallbackType(ChannelNonUserModeChangeListener.class);
102 103
 		}
103 104
 		
104
-		iChannel = getChannelInfo(sChannelName);
105
+		iChannel = getChannel(sChannelName);
105 106
 		if (iChannel == null) { 
106 107
 			// callErrorInfo(new ParserError(ParserError.ERROR_WARNING, "Got modes for channel ("+sChannelName+") that I am not on.", myParser.getLastLine()));
107 108
 			// iChannel = new ChannelInfo(myParser, sChannelName);
@@ -279,7 +280,7 @@ public class ProcessMode extends IRCProcessor {
279 280
 	 * @param sModes Exact String parsed
280 281
 	 * @return true if a method was called, false otherwise
281 282
 	 */
282
-	protected boolean callChannelModeChanged(ChannelInfo cChannel, ChannelClientInfo cChannelClient, String sHost, String sModes) {
283
+	protected boolean callChannelModeChanged(IRCChannelInfo cChannel, ChannelClientInfo cChannelClient, String sHost, String sModes) {
283 284
 		return getCallbackManager().getCallbackType(ChannelModeChangeListener.class).call(cChannel, cChannelClient, sHost, sModes);
284 285
 	}
285 286
 	
@@ -294,7 +295,7 @@ public class ProcessMode extends IRCProcessor {
294 295
 	 * @param sHost Host doing the mode changing (User host or server name)
295 296
 	 * @return true if a method was called, false otherwise
296 297
 	 */
297
-	protected boolean callChannelUserModeChanged(ChannelInfo cChannel, ChannelClientInfo cChangedClient, ChannelClientInfo cSetByClient, String sHost, String sMode) {
298
+	protected boolean callChannelUserModeChanged(IRCChannelInfo cChannel, ChannelClientInfo cChangedClient, ChannelClientInfo cSetByClient, String sHost, String sMode) {
298 299
 		return getCallbackManager().getCallbackType(ChannelUserModeChangeListener.class).call(cChannel, cChangedClient, cSetByClient, sHost, sMode);
299 300
 	}
300 301
 	

+ 4
- 3
src/com/dmdirc/parser/irc/ProcessNames.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelNamesListener;
26 27
 
27 28
 /**
@@ -39,7 +40,7 @@ public class ProcessNames extends IRCProcessor {
39 40
 		ChannelInfo iChannel;
40 41
 		if (sParam.equals("366")) {
41 42
 			// End of names
42
-			iChannel = getChannelInfo(token[3]);
43
+			iChannel = getChannel(token[3]);
43 44
 			if (iChannel == null) { return; }
44 45
 			
45 46
 			iChannel.setAddingNames(false);
@@ -56,7 +57,7 @@ public class ProcessNames extends IRCProcessor {
56 57
 			ClientInfo iClient;
57 58
 			ChannelClientInfo iChannelClient;
58 59
 			
59
-			iChannel = getChannelInfo(token[4]);
60
+			iChannel = getChannel(token[4]);
60 61
 		
61 62
 			if (iChannel == null) { return; }
62 63
 			
@@ -107,7 +108,7 @@ public class ProcessNames extends IRCProcessor {
107 108
 	 * @param cChannel Channel which the names reply is for
108 109
 	 * @return true if a method was called, false otherwise
109 110
 	 */
110
-	protected boolean callChannelGotNames(ChannelInfo cChannel) {
111
+	protected boolean callChannelGotNames(IRCChannelInfo cChannel) {
111 112
 		return getCallbackManager().getCallbackType(ChannelNamesListener.class).call(cChannel);
112 113
 	}
113 114
 	

+ 2
- 2
src/com/dmdirc/parser/irc/ProcessNick.java Dosyayı Görüntüle

@@ -61,7 +61,7 @@ public class ProcessNick extends IRCProcessor {
61 61
 					myParser.addClient(iClient);
62 62
 				}
63 63
 				
64
-				for (ChannelInfo iChannel : myParser.getChannels()) {
64
+				for (IRCChannelInfo iChannel : myParser.getChannels()) {
65 65
 					// Find the user (using the old nickname)
66 66
 					iChannelClient = iChannel.getUser(oldNickname);
67 67
 					if (iChannelClient != null) {
@@ -90,7 +90,7 @@ public class ProcessNick extends IRCProcessor {
90 90
 	 * @param sOldNick Nickname before change
91 91
 	 * @return true if a method was called, false otherwise
92 92
 	 */
93
-	protected boolean callChannelNickChanged(ChannelInfo cChannel, ChannelClientInfo cChannelClient, String sOldNick) {
93
+	protected boolean callChannelNickChanged(IRCChannelInfo cChannel, ChannelClientInfo cChannelClient, String sOldNick) {
94 94
 		return getCallbackManager().getCallbackType(ChannelNickChangeListener.class).call(cChannel, cChannelClient, sOldNick);
95 95
 	}
96 96
 	

+ 3
- 2
src/com/dmdirc/parser/irc/ProcessPart.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelPartListener;
26 27
 
27 28
 /**
@@ -45,7 +46,7 @@ public class ProcessPart extends IRCProcessor {
45 46
 		ChannelClientInfo iChannelClient;
46 47
 		
47 48
 		iClient = getClientInfo(token[0]);
48
-		iChannel = getChannelInfo(token[2]);
49
+		iChannel = getChannel(token[2]);
49 50
 		
50 51
 		if (iClient == null) { return; }
51 52
 		if (IRCParser.ALWAYS_UPDATECLIENT && iClient.getHost().isEmpty()) {
@@ -85,7 +86,7 @@ public class ProcessPart extends IRCProcessor {
85 86
 	 * @param sReason Reason given for parting (May be "")
86 87
 	 * @return true if a method was called, false otherwise
87 88
 	 */
88
-	protected boolean callChannelPart(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sReason) {
89
+	protected boolean callChannelPart(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sReason) {
89 90
 		return getCallbackManager().getCallbackType(ChannelPartListener.class).call(cChannel, cChannelClient, sReason);
90 91
 	}
91 92
 	

+ 3
- 3
src/com/dmdirc/parser/irc/ProcessQuit.java Dosyayı Görüntüle

@@ -55,8 +55,8 @@ public class ProcessQuit extends IRCProcessor {
55 55
 		String sReason = "";
56 56
 		if (token.length > 2) { sReason = token[token.length-1]; }
57 57
 		
58
-		ArrayList<ChannelInfo> channelList = new ArrayList<ChannelInfo>(myParser.getChannels());
59
-		for (ChannelInfo iChannel : channelList) {
58
+		ArrayList<IRCChannelInfo> channelList = new ArrayList<IRCChannelInfo>(myParser.getChannels());
59
+		for (IRCChannelInfo iChannel : channelList) {
60 60
 			iChannelClient = iChannel.getUser(iClient);
61 61
 			if (iChannelClient != null) {
62 62
 				if (myParser.removeAfterCallback) { callChannelQuit(iChannel,iChannelClient,sReason); }
@@ -88,7 +88,7 @@ public class ProcessQuit extends IRCProcessor {
88 88
 	 * @param sReason Quit reason
89 89
 	 * @return true if a method was called, false otherwise
90 90
 	 */
91
-	protected boolean callChannelQuit(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sReason) {
91
+	protected boolean callChannelQuit(final IRCChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sReason) {
92 92
 		return getCallbackManager().getCallbackType(ChannelQuitListener.class).call(cChannel, cChannelClient, sReason);
93 93
 	}
94 94
 	

+ 4
- 3
src/com/dmdirc/parser/irc/ProcessTopic.java Dosyayı Görüntüle

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.parser.irc;
24 24
 
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
25 26
 import com.dmdirc.parser.interfaces.callbacks.ChannelTopicListener;
26 27
 
27 28
 /**
@@ -38,12 +39,12 @@ public class ProcessTopic extends IRCProcessor {
38 39
 	public void process(final String sParam, final String[] token) {
39 40
 		ChannelInfo iChannel;
40 41
 		if (sParam.equals("332")) {
41
-			iChannel = getChannelInfo(token[3]);
42
+			iChannel = getChannel(token[3]);
42 43
 			if (iChannel == null) { return; }
43 44
 			iChannel.setTopic(token[token.length-1]);
44 45
 		} else if (sParam.equals("333")) {
45 46
 			if (token.length > 3) {
46
-				iChannel = getChannelInfo(token[3]);
47
+				iChannel = getChannel(token[3]);
47 48
 				if (iChannel == null) { return; }
48 49
 				if (token.length > 4) {
49 50
 					iChannel.setTopicUser(token[4]);
@@ -58,7 +59,7 @@ public class ProcessTopic extends IRCProcessor {
58 59
 				final ClientInfo iClient = getClientInfo(token[0]);
59 60
 				if (iClient != null && iClient.getHost().isEmpty()) {iClient.setUserBits(token[0],false); }
60 61
 			}
61
-			iChannel = getChannelInfo(token[2]);
62
+			iChannel = getChannel(token[2]);
62 63
 			if (iChannel == null) { return; }
63 64
 			iChannel.setTopicTime(System.currentTimeMillis() / 1000);
64 65
 			if (token[0].charAt(0) == ':') { token[0] = token[0].substring(1); }

+ 2
- 6
src/com/dmdirc/parser/irc/ProcessWho.java Dosyayı Görüntüle

@@ -47,9 +47,6 @@ public class ProcessWho extends IRCProcessor {
47 47
 		// :server 352 mynickname channel username address server nick flags :hops info
48 48
 		//     0    1      2         3     4          5      6      7    8        9
49 49
 		
50
-//		ChannelInfo channel = myParser.getChannelInfo(token[3]);
51
-//		ChannelClientInfo channelClient = channel.getUser(token[7]);
52
-//		ClientInfo client = channelClient.getClient();
53 50
 		final ClientInfo client = myParser.getClientInfo(token[7]);
54 51
 		if (client != null) {
55 52
 			// Update ident/host
@@ -63,7 +60,6 @@ public class ProcessWho extends IRCProcessor {
63 60
 			final String mode = token[8];
64 61
 			final boolean isAway = mode.indexOf('G') != -1;
65 62
 			if (client.getAwayState() != isAway) {
66
-//				System.out.println("Away state for '"+client+"' changed to: "+isAway);
67 63
 				client.setAwayState(isAway);
68 64
 				if (!isAway) { client.setAwayReason(""); }
69 65
 				if (client == myParser.getMyself()) {
@@ -72,7 +68,7 @@ public class ProcessWho extends IRCProcessor {
72 68
 					callAwayStateOther(client, isAway);
73 69
 					
74 70
 					ChannelClientInfo iChannelClient;
75
-					for (ChannelInfo iChannel : myParser.getChannels()) {
71
+					for (IRCChannelInfo iChannel : myParser.getChannels()) {
76 72
 						iChannelClient = iChannel.getUser(client);
77 73
 						if (iChannelClient != null) {
78 74
 							callChannelAwayStateOther(iChannel,iChannelClient,isAway);
@@ -116,7 +112,7 @@ public class ProcessWho extends IRCProcessor {
116 112
 	 * @param state Away State (true if away, false if here)
117 113
 	 * @return true if a method was called, false otherwise
118 114
 	 */
119
-	protected boolean callChannelAwayStateOther(final ChannelInfo channel, final ChannelClientInfo channelClient, final boolean state) {
115
+	protected boolean callChannelAwayStateOther(final IRCChannelInfo channel, final ChannelClientInfo channelClient, final boolean state) {
120 116
 		return getCallbackManager().getCallbackType(ChannelOtherAwayStateListener.class).call(channel, channelClient, state);
121 117
 	}
122 118
 	

+ 5
- 5
src/com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.java Dosyayı Görüntüle

@@ -23,7 +23,7 @@
23 23
 package com.dmdirc.parser.irc.callbacks;
24 24
 
25 25
 import com.dmdirc.parser.interfaces.Parser;
26
-import com.dmdirc.parser.irc.ChannelInfo;
26
+import com.dmdirc.parser.irc.IRCChannelInfo;
27 27
 import com.dmdirc.parser.irc.ClientInfo;
28 28
 import com.dmdirc.parser.irc.ParserError;
29 29
 import com.dmdirc.parser.interfaces.callbacks.CallbackInterface;
@@ -62,7 +62,7 @@ public class CallbackObjectSpecific extends CallbackObject {
62 62
 	 * @param cChannel ChannelInfo object for the channel to test
63 63
 	 * @return true if channel given matches the specifics for the method given
64 64
 	 */
65
-	protected boolean isValidChan(final CallbackInterface eMethod, final ChannelInfo cChannel) {
65
+	protected boolean isValidChan(final CallbackInterface eMethod, final IRCChannelInfo cChannel) {
66 66
 		if (specificData.containsKey(eMethod)) { 
67 67
 			if (!myParser.getIRCStringConverter().equalsIgnoreCase(cChannel.getName(), specificData.get(eMethod))) { return false; }
68 68
 		}
@@ -144,9 +144,9 @@ public class CallbackObjectSpecific extends CallbackObject {
144 144
             if (type.isAnnotationPresent(SpecificCallback.class) &&
145 145
                     ((args[0] instanceof ClientInfo
146 146
                         && !isValidUser(iface, ((ClientInfo) args[0]).getHost()))
147
-                        || (args[0] instanceof ChannelInfo
148
-                        && !isValidChan(iface, (ChannelInfo) args[0]))
149
-                        || (!(args[0] instanceof ClientInfo || args[0] instanceof ChannelInfo) &&
147
+                        || (args[0] instanceof IRCChannelInfo
148
+                        && !isValidChan(iface, (IRCChannelInfo) args[0]))
149
+                        || (!(args[0] instanceof ClientInfo || args[0] instanceof IRCChannelInfo) &&
150 150
                         args[args.length - 1] instanceof String
151 151
                         && !isValidUser(iface, (String) args[args.length - 1])))) {
152 152
                 continue;

+ 2
- 2
test/com/dmdirc/addons/logging/LoggingPluginTest.java Dosyayı Görüntüle

@@ -30,7 +30,7 @@ import com.dmdirc.actions.CoreActionType;
30 30
 import com.dmdirc.config.IdentityManager;
31 31
 import com.dmdirc.harness.TestLoggingPlugin;
32 32
 import com.dmdirc.harness.parser.TestParserFactory;
33
-import com.dmdirc.parser.irc.ChannelInfo;
33
+import com.dmdirc.parser.irc.IRCChannelInfo;
34 34
 import com.dmdirc.addons.ui_dummy.DummyController;
35 35
 import com.dmdirc.plugins.PluginInfo;
36 36
 import com.dmdirc.util.ConfigFile;
@@ -54,7 +54,7 @@ public class LoggingPluginTest {
54 54
         server = new Server("255.255.255.255", 6667, "", false,
55 55
                 IdentityManager.getProfiles().get(0), new ArrayList<String>(),
56 56
                 new TestParserFactory());
57
-        channel = new Channel(server, new ChannelInfo(server.getParser(), "#test"));
57
+        channel = new Channel(server, new IRCChannelInfo(server.getParser(), "#test"));
58 58
         query = new Query(server, "foo!bar@baz");
59 59
 
60 60
         final ConfigFile file = new ConfigFile(LoggingPlugin.class

+ 4
- 4
test/com/dmdirc/commandparser/commands/channel/KickReasonTest.java Dosyayı Görüntüle

@@ -27,7 +27,7 @@ import com.dmdirc.config.IdentityManager;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.config.ConfigManager;
29 29
 import com.dmdirc.parser.irc.ChannelClientInfo;
30
-import com.dmdirc.parser.irc.ChannelInfo;
30
+import com.dmdirc.parser.irc.IRCChannelInfo;
31 31
 import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
33 33
 import org.junit.BeforeClass;
@@ -54,7 +54,7 @@ public class KickReasonTest {
54 54
     @Test
55 55
     public void testUnknown() {
56 56
         final InputWindow tiw = mock(InputWindow.class);
57
-        final ChannelInfo channelInfo = mock(ChannelInfo.class);
57
+        final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
58 58
         final Channel channel = mock(Channel.class);
59 59
 
60 60
         when(channel.getChannelInfo()).thenReturn(channelInfo);
@@ -68,7 +68,7 @@ public class KickReasonTest {
68 68
     @Test
69 69
     public void testWithReason() {
70 70
         final InputWindow tiw = mock(InputWindow.class);
71
-        final ChannelInfo channelInfo = mock(ChannelInfo.class);
71
+        final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
72 72
         final Channel channel = mock(Channel.class);
73 73
         final ChannelClientInfo cci = mock(ChannelClientInfo.class);
74 74
 
@@ -84,7 +84,7 @@ public class KickReasonTest {
84 84
     public void testWithoutReason() {
85 85
         final InputWindow tiw = mock(InputWindow.class);
86 86
         final ConfigManager manager = mock(ConfigManager.class);
87
-        final ChannelInfo channelInfo = mock(ChannelInfo.class);
87
+        final IRCChannelInfo channelInfo = mock(IRCChannelInfo.class);
88 88
         final Channel channel = mock(Channel.class);
89 89
         final ChannelClientInfo cci = mock(ChannelClientInfo.class);
90 90
 

+ 3
- 3
test/com/dmdirc/commandparser/commands/channel/ModeTest.java Dosyayı Görüntüle

@@ -26,7 +26,7 @@ import com.dmdirc.Channel;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.config.IdentityManager;
29
-import com.dmdirc.parser.irc.ChannelInfo;
29
+import com.dmdirc.parser.irc.IRCChannelInfo;
30 30
 import com.dmdirc.parser.irc.IRCParser;
31 31
 import com.dmdirc.ui.interfaces.InputWindow;
32 32
 
@@ -38,7 +38,7 @@ import static org.mockito.Mockito.*;
38 38
 public class ModeTest {
39 39
 
40 40
     private final Mode command = new Mode();
41
-    private ChannelInfo channelinfo;
41
+    private IRCChannelInfo channelinfo;
42 42
     private Channel channel;
43 43
     private Server server;
44 44
     private IRCParser parser;
@@ -55,7 +55,7 @@ public class ModeTest {
55 55
         parser = mock(IRCParser.class);
56 56
         server = mock(Server.class);
57 57
         channel = mock(Channel.class);
58
-        channelinfo = mock(ChannelInfo.class);
58
+        channelinfo = mock(IRCChannelInfo.class);
59 59
 
60 60
         when(server.getParser()).thenReturn(parser);
61 61
         when(channel.getChannelInfo()).thenReturn(channelinfo);

+ 3
- 3
test/com/dmdirc/commandparser/commands/channel/NamesTest.java Dosyayı Görüntüle

@@ -26,7 +26,7 @@ import com.dmdirc.Channel;
26 26
 import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.config.IdentityManager;
29
-import com.dmdirc.parser.irc.ChannelInfo;
29
+import com.dmdirc.parser.irc.IRCChannelInfo;
30 30
 import com.dmdirc.parser.irc.IRCParser;
31 31
 
32 32
 import org.junit.Before;
@@ -37,7 +37,7 @@ import static org.mockito.Mockito.*;
37 37
 public class NamesTest {
38 38
 
39 39
     private final Names command = new Names();
40
-    private ChannelInfo channelinfo;
40
+    private IRCChannelInfo channelinfo;
41 41
     private Channel channel;
42 42
     private Server server;
43 43
     private IRCParser parser;
@@ -54,7 +54,7 @@ public class NamesTest {
54 54
         parser = mock(IRCParser.class);
55 55
         server = mock(Server.class);
56 56
         channel = mock(Channel.class);
57
-        channelinfo = mock(ChannelInfo.class);
57
+        channelinfo = mock(IRCChannelInfo.class);
58 58
 
59 59
         when(server.getParser()).thenReturn(parser);
60 60
         when(channel.getChannelInfo()).thenReturn(channelinfo);

+ 1
- 1
test/com/dmdirc/commandparser/commands/channel/PartTest.java Dosyayı Görüntüle

@@ -27,7 +27,7 @@ import com.dmdirc.Server;
27 27
 import com.dmdirc.commandparser.CommandArguments;
28 28
 import com.dmdirc.config.ConfigManager;
29 29
 import com.dmdirc.config.IdentityManager;
30
-import com.dmdirc.parser.irc.ChannelInfo;
30
+import com.dmdirc.parser.irc.IRCChannelInfo;
31 31
 import com.dmdirc.parser.irc.IRCParser;
32 32
 import com.dmdirc.ui.interfaces.InputWindow;
33 33
 

+ 2
- 2
test/com/dmdirc/harness/parser/TestIChannelPart.java Dosyayı Görüntüle

@@ -27,13 +27,13 @@ import com.dmdirc.parser.interfaces.callbacks.ChannelPartListener;
27 27
 
28 28
 public class TestIChannelPart implements ChannelPartListener {
29 29
 
30
-    public ChannelInfo channel;
30
+    public IRCChannelInfo channel;
31 31
 
32 32
     public ChannelClientInfo cclient;
33 33
 
34 34
     public String reason;
35 35
 
36
-    public void onChannelPart(IRCParser tParser, ChannelInfo cChannel,
36
+    public void onChannelPart(IRCParser tParser, IRCChannelInfo cChannel,
37 37
                               ChannelClientInfo cChannelClient, String sReason) {
38 38
         channel = cChannel;
39 39
         cclient = cChannelClient;

+ 2
- 2
test/com/dmdirc/harness/parser/TestIChannelSelfJoin.java Dosyayı Görüntüle

@@ -27,9 +27,9 @@ import com.dmdirc.parser.interfaces.callbacks.ChannelSelfJoinListener;
27 27
 
28 28
 public class TestIChannelSelfJoin implements ChannelSelfJoinListener {
29 29
 
30
-    public ChannelInfo channel = null;
30
+    public IRCChannelInfo channel = null;
31 31
 
32
-    public void onChannelSelfJoin(IRCParser tParser, ChannelInfo cChannel) {
32
+    public void onChannelSelfJoin(IRCParser tParser, IRCChannelInfo cChannel) {
33 33
         channel = cChannel;
34 34
     }
35 35
 }

+ 2
- 2
test/com/dmdirc/harness/parser/TestIChannelTopic.java Dosyayı Görüntüle

@@ -31,9 +31,9 @@ public class TestIChannelTopic implements ChannelTopicListener {
31 31
 
32 32
     public boolean isJoin;
33 33
 
34
-    public ChannelInfo channel;
34
+    public IRCChannelInfo channel;
35 35
 
36
-    public void onChannelTopic(IRCParser tParser, ChannelInfo cChannel,
36
+    public void onChannelTopic(IRCParser tParser, IRCChannelInfo cChannel,
37 37
                                boolean bIsJoinTopic) {
38 38
         triggered = true;
39 39
         isJoin = bIsJoinTopic;

+ 2
- 2
test/com/dmdirc/harness/parser/TestIQuit.java Dosyayı Görüntüle

@@ -28,7 +28,7 @@ import com.dmdirc.parser.interfaces.callbacks.QuitListener;
28 28
 
29 29
 public class TestIQuit implements ChannelQuitListener, QuitListener {
30 30
 
31
-    public ChannelInfo channel;
31
+    public IRCChannelInfo channel;
32 32
 
33 33
     public ChannelClientInfo cclient;
34 34
 
@@ -38,7 +38,7 @@ public class TestIQuit implements ChannelQuitListener, QuitListener {
38 38
 
39 39
     public int count = 0;
40 40
 
41
-    public void onChannelQuit(IRCParser tParser, ChannelInfo cChannel,
41
+    public void onChannelQuit(IRCParser tParser, IRCChannelInfo cChannel,
42 42
                               ChannelClientInfo cChannelClient, String sReason) {
43 43
         this.channel = cChannel;
44 44
         this.cclient = cChannelClient;

+ 23
- 22
test/com/dmdirc/parser/irc/ChannelInfoTest.java Dosyayı Görüntüle

@@ -23,6 +23,7 @@ package com.dmdirc.parser.irc;
23 23
 
24 24
 import com.dmdirc.harness.parser.TestParser;
25 25
 
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
26 27
 import java.util.HashMap;
27 28
 import java.util.Map;
28 29
 
@@ -32,7 +33,7 @@ import static org.junit.Assert.*;
32 33
 
33 34
 public class ChannelInfoTest {
34 35
 
35
-    final ChannelInfo ci = new ChannelInfo(null, "name");
36
+    final IRCChannelInfo ci = new IRCChannelInfo(null, "name");
36 37
 
37 38
     @Test
38 39
     public void testGetName() {
@@ -81,7 +82,7 @@ public class ChannelInfoTest {
81 82
     @Test
82 83
     public void testSendMessage() {
83 84
         final TestParser parser = new TestParser();
84
-        getChannelInfo(parser).sendMessage("hello");
85
+        getChannel(parser).sendMessage("hello");
85 86
 
86 87
         assertEquals("PRIVMSG #DMDirc_testing :hello", parser.sentLines.get(0));
87 88
     }
@@ -89,7 +90,7 @@ public class ChannelInfoTest {
89 90
     @Test
90 91
     public void testSendNotice() {
91 92
         final TestParser parser = new TestParser();
92
-        getChannelInfo(parser).sendNotice("hello");
93
+        getChannel(parser).sendNotice("hello");
93 94
 
94 95
         assertEquals("NOTICE #DMDirc_testing :hello", parser.sentLines.get(0));
95 96
     }
@@ -97,7 +98,7 @@ public class ChannelInfoTest {
97 98
     @Test
98 99
     public void testSendCTCP() {
99 100
         final TestParser parser = new TestParser();
100
-        getChannelInfo(parser).sendCTCP("type", "hello");
101
+        getChannel(parser).sendCTCP("type", "hello");
101 102
 
102 103
         assertEquals("PRIVMSG #DMDirc_testing :" + ((char) 1) + "TYPE hello" + ((char) 1),
103 104
                 parser.sentLines.get(0));
@@ -106,7 +107,7 @@ public class ChannelInfoTest {
106 107
     @Test
107 108
     public void testSendCTCPEmpty() {
108 109
         final TestParser parser = new TestParser();
109
-        getChannelInfo(parser).sendCTCP("type", "");
110
+        getChannel(parser).sendCTCP("type", "");
110 111
 
111 112
         assertEquals("PRIVMSG #DMDirc_testing :" + ((char) 1) + "TYPE" + ((char) 1),
112 113
                 parser.sentLines.get(0));
@@ -115,7 +116,7 @@ public class ChannelInfoTest {
115 116
     @Test
116 117
     public void testSendAction() {
117 118
         final TestParser parser = new TestParser();
118
-        getChannelInfo(parser).sendAction("moo");
119
+        getChannel(parser).sendAction("moo");
119 120
 
120 121
         assertEquals("PRIVMSG #DMDirc_testing :" + ((char) 1) + "ACTION moo" + ((char) 1),
121 122
                 parser.sentLines.get(0));
@@ -124,7 +125,7 @@ public class ChannelInfoTest {
124 125
     @Test
125 126
     public void testSendCTCPReply() {
126 127
         final TestParser parser = new TestParser();
127
-        getChannelInfo(parser).sendCTCPReply("type", "moo");
128
+        getChannel(parser).sendCTCPReply("type", "moo");
128 129
 
129 130
         assertEquals("NOTICE #DMDirc_testing :" + ((char) 1) + "TYPE moo" + ((char) 1),
130 131
                 parser.sentLines.get(0));
@@ -133,7 +134,7 @@ public class ChannelInfoTest {
133 134
     @Test
134 135
     public void testSendCTCPReplyEmpty() {
135 136
         final TestParser parser = new TestParser();
136
-        getChannelInfo(parser).sendCTCPReply("type", "");
137
+        getChannel(parser).sendCTCPReply("type", "");
137 138
 
138 139
         assertEquals("NOTICE #DMDirc_testing :" + ((char) 1) + "TYPE" + ((char) 1),
139 140
                 parser.sentLines.get(0));
@@ -142,7 +143,7 @@ public class ChannelInfoTest {
142 143
     @Test
143 144
     public void testSendEmptyMessages() {
144 145
         final TestParser parser = new TestParser();
145
-        final ChannelInfo info = getChannelInfo(parser);
146
+        final ChannelInfo info = getChannel(parser);
146 147
         
147 148
         info.sendAction("");
148 149
         info.sendCTCP("", "");
@@ -156,7 +157,7 @@ public class ChannelInfoTest {
156 157
     @Test
157 158
     public void testGetSetParamMode() {
158 159
         final TestParser parser = new TestParser();
159
-        final ChannelInfo info = getChannelInfo(parser);
160
+        final ChannelInfo info = getChannel(parser);
160 161
         parser.injectLine(":server 324 nick #DMDirc_testing +k lalala");
161 162
         parser.sentLines.clear();
162 163
         
@@ -171,7 +172,7 @@ public class ChannelInfoTest {
171 172
     @Test
172 173
     public void testModeSendFull() {
173 174
         final TestParser parser = new TestParser();
174
-        final ChannelInfo info = getChannelInfo(parser);
175
+        final ChannelInfo info = getChannel(parser);
175 176
 
176 177
         parser.sentLines.clear();
177 178
         info.alterMode(true, 'i', null);
@@ -196,7 +197,7 @@ public class ChannelInfoTest {
196 197
     @Test
197 198
     public void testModeSendExtra() {
198 199
         final TestParser parser = new TestParser();
199
-        final ChannelInfo info = getChannelInfo(parser);
200
+        final ChannelInfo info = getChannel(parser);
200 201
 
201 202
         parser.sentLines.clear();
202 203
         info.alterMode(true, 'i', null);
@@ -226,7 +227,7 @@ public class ChannelInfoTest {
226 227
     @Test
227 228
     public void testModeSendOptimisation1() {
228 229
         final TestParser parser = new TestParser();
229
-        final ChannelInfo info = getChannelInfo(parser);
230
+        final ChannelInfo info = getChannel(parser);
230 231
 
231 232
         parser.sentLines.clear();
232 233
         info.alterMode(true, 'i', null);
@@ -250,7 +251,7 @@ public class ChannelInfoTest {
250 251
     @Test
251 252
     public void testModeSendOptimisation2() {
252 253
         final TestParser parser = new TestParser();
253
-        final ChannelInfo info = getChannelInfo(parser);
254
+        final ChannelInfo info = getChannel(parser);
254 255
 
255 256
         parser.sentLines.clear();
256 257
         info.alterMode(true, 'm', null);
@@ -272,7 +273,7 @@ public class ChannelInfoTest {
272 273
     @Test
273 274
     public void testModeUnsetKey() {
274 275
         final TestParser parser = new TestParser();
275
-        final ChannelInfo info = getChannelInfo(parser);
276
+        final ChannelInfo info = getChannel(parser);
276 277
         parser.injectLine(":server 324 nick #DMDirc_testing +k lalala");
277 278
         parser.sentLines.clear();
278 279
         
@@ -294,16 +295,16 @@ public class ChannelInfoTest {
294 295
         parser.injectLine(":foo!bar@baz JOIN #DMDirc_testing");
295 296
         parser.injectLine(":flub!floo@fleeee JOIN #DMDirc_testing");
296 297
 
297
-        assertNotSame(parser.getChannelInfo("#DMDirc_testing").getChannelClients(),
298
-                parser.getChannelInfo("#DMDirc_testing").getChannelClients());
299
-        assertEquals(parser.getChannelInfo("#DMDirc_testing").getChannelClients(),
300
-                parser.getChannelInfo("#DMDirc_testing").getChannelClients());
298
+        assertNotSame(parser.getChannel("#DMDirc_testing").getChannelClients(),
299
+                parser.getChannel("#DMDirc_testing").getChannelClients());
300
+        assertEquals(parser.getChannel("#DMDirc_testing").getChannelClients(),
301
+                parser.getChannel("#DMDirc_testing").getChannelClients());
301 302
     }
302 303
     
303 304
     @Test @Ignore
304 305
     public void testModeUnsetKeyMultiple() {
305 306
         final TestParser parser = new TestParser();
306
-        final ChannelInfo info = getChannelInfo(parser);
307
+        final ChannelInfo info = getChannel(parser);
307 308
         parser.injectLine(":server 324 nick #DMDirc_testing +k lalala");
308 309
         parser.sentLines.clear();
309 310
         
@@ -321,7 +322,7 @@ public class ChannelInfoTest {
321 322
     @Test @Ignore
322 323
     public void testModeUnsetLimitMultiple() {
323 324
         final TestParser parser = new TestParser();
324
-        final ChannelInfo info = getChannelInfo(parser);
325
+        final ChannelInfo info = getChannel(parser);
325 326
         parser.injectLine(":server 324 nick #DMDirc_testing +l 73");
326 327
         parser.sentLines.clear();
327 328
         
@@ -346,7 +347,7 @@ public class ChannelInfoTest {
346 347
         return res;
347 348
     }
348 349
 
349
-    private ChannelInfo getChannelInfo(final TestParser parser) {
350
+    private ChannelInfo getChannel(final TestParser parser) {
350 351
         parser.injectConnectionStrings();
351 352
         parser.injectLine(":nick JOIN #DMDirc_testing");
352 353
 

+ 2
- 2
test/com/dmdirc/parser/irc/IRCParserTest.java Dosyayı Görüntüle

@@ -404,7 +404,7 @@ public class IRCParserTest {
404 404
         parser.injectLine(":server " + numeric2 + " nick #D :End of Channel Something List");
405 405
 
406 406
         final List<ChannelListModeItem> items
407
-                = parser.getChannelInfo("#D").getListModeParam(mode);
407
+                = parser.getChannel("#D").getListModeParam(mode);
408 408
 
409 409
         assertEquals(3, items.size());
410 410
         boolean gotOne = false, gotTwo = false, gotThree = false;
@@ -470,7 +470,7 @@ public class IRCParserTest {
470 470
         parser.getCallbackManager().addCallback(ChannelKickListener.class, ick, "#D");
471 471
         parser.injectLine(":bar!me@moo KICK #D nick :Bye!");
472 472
 
473
-        verify(ick).onChannelKick(same(parser), (ChannelInfo) anyObject(),
473
+        verify(ick).onChannelKick(same(parser), (IRCChannelInfo) anyObject(),
474 474
                 (ChannelClientInfo) anyObject(), (ChannelClientInfo) anyObject(),
475 475
                 anyString(), anyString());
476 476
     }

+ 2
- 2
test/com/dmdirc/parser/irc/ProcessJoinTest.java Dosyayı Görüntüle

@@ -49,7 +49,7 @@ public class ProcessJoinTest {
49 49
         assertSame(parser, test.channel.getParser());
50 50
         assertEquals(1, parser.getChannels().size());
51 51
         assertTrue(parser.getChannels().contains(test.channel));
52
-        assertEquals(test.channel, parser.getChannelInfo("#DMDirc_testing"));
52
+        assertEquals(test.channel, parser.getChannel("#DMDirc_testing"));
53 53
     }
54 54
     
55 55
     @Test
@@ -63,7 +63,7 @@ public class ProcessJoinTest {
63 63
         parser.injectLine(":nick JOIN #DMDirc_testing");
64 64
         parser.injectLine(":foo!bar@baz JOIN #DMDirc_testing");
65 65
 
66
-        verify(test).onChannelJoin(parser, parser.getChannelInfo("#DMDirc_testing"),
66
+        verify(test).onChannelJoin(parser, parser.getChannel("#DMDirc_testing"),
67 67
                 parser.getClientInfo("foo!bar@baz").getChannelClients().get(0));
68 68
     }    
69 69
 

+ 3
- 3
test/com/dmdirc/parser/irc/ProcessModeTest.java Dosyayı Görüntüle

@@ -138,9 +138,9 @@ public class ProcessModeTest {
138 138
         parser.injectLine(":server 366 nick #DMDirc_testing :End of /NAMES list");
139 139
         parser.injectLine(":server 324 nick #DMDirc_testing +Zstnl 1234");
140 140
 
141
-        assertEquals("1234", parser.getChannelInfo("#DMDirc_testing").getModeParam('l'));
141
+        assertEquals("1234", parser.getChannel("#DMDirc_testing").getModeParam('l'));
142 142
         
143
-        String modes = parser.getChannelInfo("#DMDirc_testing").getModeStr().split(" ")[0];
143
+        String modes = parser.getChannel("#DMDirc_testing").getModeStr().split(" ")[0];
144 144
         assertEquals(6, modes.length());
145 145
         assertEquals('+', modes.charAt(0));
146 146
         assertTrue(modes.indexOf('Z') > -1);
@@ -151,7 +151,7 @@ public class ProcessModeTest {
151 151
         
152 152
         parser.injectLine(":server MODE #DMDirc_testing :-Z");
153 153
         
154
-        modes = parser.getChannelInfo("#DMDirc_testing").getModeStr().split(" ")[0];
154
+        modes = parser.getChannel("#DMDirc_testing").getModeStr().split(" ")[0];
155 155
         assertEquals(5, modes.length());
156 156
         assertEquals('+', modes.charAt(0));
157 157
         assertTrue(modes.indexOf('s') > -1);

+ 5
- 5
test/com/dmdirc/parser/irc/ProcessNamesTest.java Dosyayı Görüntüle

@@ -53,20 +53,20 @@ public class ProcessNamesTest {
53 53
         parser.injectLine(":server 366 nick #DMDirc_testing :End of /NAMES list");
54 54
 
55 55
         assertEquals(1, parser.getChannels().size());
56
-        assertNotNull(parser.getChannelInfo("#DMDirc_testing"));
57
-        assertEquals(4, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
56
+        assertNotNull(parser.getChannel("#DMDirc_testing"));
57
+        assertEquals(4, parser.getChannel("#DMDirc_testing").getChannelClients().size());
58 58
         assertNotNull(parser.getClientInfo("luser"));
59 59
         assertEquals(1, parser.getClientInfo("luser").getChannelClients().size());
60 60
 
61 61
         ChannelClientInfo cci = parser.getClientInfo("luser").getChannelClients().get(0);
62
-        assertEquals(parser.getChannelInfo("#DMDirc_testing"), cci.getChannel());
62
+        assertEquals(parser.getChannel("#DMDirc_testing"), cci.getChannel());
63 63
         assertEquals("+", cci.getChanModeStr(true));
64 64
         
65
-        cci = parser.getChannelInfo("#DMDirc_testing").getUser("nick2");
65
+        cci = parser.getChannel("#DMDirc_testing").getUser("nick2");
66 66
         assertNotNull(cci);
67 67
         assertEquals("@+", cci.getChanModeStr(true));
68 68
 
69
-        cci = parser.getChannelInfo("#DMDirc_testing").getUser("nick3");
69
+        cci = parser.getChannel("#DMDirc_testing").getUser("nick3");
70 70
         assertNotNull(cci);
71 71
         assertEquals("", cci.getChanModeStr(true));
72 72
     }

+ 2
- 2
test/com/dmdirc/parser/irc/ProcessNickTest.java Dosyayı Görüntüle

@@ -51,7 +51,7 @@ public class ProcessNickTest {
51 51
         assertEquals(1, parser.getClientInfo("LUSER").getChannelClients().size());
52 52
 
53 53
         ChannelClientInfo cci = parser.getClientInfo("LUSER").getChannelClients().get(0);
54
-        assertEquals(parser.getChannelInfo("#DMDirc_testing"), cci.getChannel());
54
+        assertEquals(parser.getChannel("#DMDirc_testing"), cci.getChannel());
55 55
         assertEquals("+", cci.getChanModeStr(true));
56 56
         
57 57
         assertSame(cci.getClient(), tinc.client);
@@ -73,7 +73,7 @@ public class ProcessNickTest {
73 73
         assertEquals(1, parser.getClientInfo("foobar").getChannelClients().size());
74 74
 
75 75
         ChannelClientInfo cci = parser.getClientInfo("foobar").getChannelClients().get(0);
76
-        assertEquals(parser.getChannelInfo("#DMDirc_testing"), cci.getChannel());
76
+        assertEquals(parser.getChannel("#DMDirc_testing"), cci.getChannel());
77 77
         assertEquals("+", cci.getChanModeStr(true));
78 78
     }    
79 79
     

+ 4
- 4
test/com/dmdirc/parser/irc/ProcessPartTest.java Dosyayı Görüntüle

@@ -45,11 +45,11 @@ public class ProcessPartTest {
45 45
         final TestIChannelPart test = new TestIChannelPart();
46 46
         parser.getCallbackManager().addCallback(ChannelPartListener.class, test);
47 47
         
48
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
48
+        assertEquals(2, parser.getChannel("#DMDirc_testing").getChannelClients().size());
49 49
         
50 50
         parser.injectLine(":luser!foo@barsville PART #DMDirc_testing :Bye bye, cruel world");
51 51
         
52
-        assertEquals(1, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
52
+        assertEquals(1, parser.getChannel("#DMDirc_testing").getChannelClients().size());
53 53
         
54 54
         assertNotNull(test.channel);
55 55
         assertNotNull(test.cclient);
@@ -73,11 +73,11 @@ public class ProcessPartTest {
73 73
         final TestIChannelPart test = new TestIChannelPart();
74 74
         parser.getCallbackManager().addCallback(ChannelPartListener.class, test);
75 75
         
76
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
76
+        assertEquals(2, parser.getChannel("#DMDirc_testing").getChannelClients().size());
77 77
         
78 78
         parser.injectLine(":luser!foo@barsville PART #DMDirc_testing");
79 79
         
80
-        assertEquals(1, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
80
+        assertEquals(1, parser.getChannel("#DMDirc_testing").getChannelClients().size());
81 81
         
82 82
         assertNotNull(test.channel);
83 83
         assertNotNull(test.cclient);

+ 8
- 8
test/com/dmdirc/parser/irc/ProcessQuitTest.java Dosyayı Görüntüle

@@ -49,12 +49,12 @@ public class ProcessQuitTest {
49 49
         final TestIQuit test = new TestIQuit();
50 50
         parser.getCallbackManager().addCallback(ChannelQuitListener.class, test);
51 51
         
52
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
52
+        assertEquals(2, parser.getChannel("#DMDirc_testing").getChannelClients().size());
53 53
         
54 54
         parser.injectLine(":luser!foo@barsville QUIT :Bye bye, cruel world");
55 55
         
56
-        assertEquals(1, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
57
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing2").getChannelClients().size());
56
+        assertEquals(1, parser.getChannel("#DMDirc_testing").getChannelClients().size());
57
+        assertEquals(2, parser.getChannel("#DMDirc_testing2").getChannelClients().size());
58 58
         
59 59
         assertNotNull(test.channel);
60 60
         assertNotNull(test.cclient);
@@ -82,12 +82,12 @@ public class ProcessQuitTest {
82 82
         final TestIQuit test = new TestIQuit();
83 83
         parser.getCallbackManager().addCallback(QuitListener.class, test);
84 84
         
85
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
85
+        assertEquals(2, parser.getChannel("#DMDirc_testing").getChannelClients().size());
86 86
         
87 87
         parser.injectLine(":luser!foo@barsville QUIT :Bye bye, cruel world");
88 88
         
89
-        assertEquals(1, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
90
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing2").getChannelClients().size());
89
+        assertEquals(1, parser.getChannel("#DMDirc_testing").getChannelClients().size());
90
+        assertEquals(2, parser.getChannel("#DMDirc_testing2").getChannelClients().size());
91 91
         
92 92
         assertNotNull(test.client);
93 93
         assertNotNull(test.reason);
@@ -110,11 +110,11 @@ public class ProcessQuitTest {
110 110
         final TestIQuit test = new TestIQuit();
111 111
         parser.getCallbackManager().addCallback(QuitListener.class, test);
112 112
         
113
-        assertEquals(2, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
113
+        assertEquals(2, parser.getChannel("#DMDirc_testing").getChannelClients().size());
114 114
         
115 115
         parser.injectLine(":luser!foo@barsville QUIT");
116 116
         
117
-        assertEquals(1, parser.getChannelInfo("#DMDirc_testing").getChannelClients().size());
117
+        assertEquals(1, parser.getChannel("#DMDirc_testing").getChannelClients().size());
118 118
         
119 119
         assertNotNull(test.client);
120 120
         assertNotNull(test.reason);

Loading…
İptal
Kaydet