|
@@ -48,6 +48,7 @@ import java.net.InetAddress;
|
48
|
48
|
import java.net.InetSocketAddress;
|
49
|
49
|
import java.net.Proxy;
|
50
|
50
|
import java.net.Socket;
|
|
51
|
+import java.net.URI;
|
51
|
52
|
import java.net.UnknownHostException;
|
52
|
53
|
import java.security.KeyManagementException;
|
53
|
54
|
import java.security.NoSuchAlgorithmException;
|
|
@@ -269,12 +270,12 @@ public class IRCParser implements SecureParser, Runnable {
|
269
|
270
|
private String bindIP = "";
|
270
|
271
|
|
271
|
272
|
/** This is list containing 001 - 005 inclusive. */
|
272
|
|
- private List<String> serverInformationLines = new LinkedList<String>();
|
|
273
|
+ private final List<String> serverInformationLines = new LinkedList<String>();
|
273
|
274
|
|
274
|
275
|
/**
|
275
|
276
|
* Default constructor, ServerInfo and MyInfo need to be added separately (using IRC.me and IRC.server).
|
276
|
277
|
*/
|
277
|
|
- public IRCParser() { this(null, null); }
|
|
278
|
+ public IRCParser() { this((MyInfo) null); }
|
278
|
279
|
/**
|
279
|
280
|
* Constructor with ServerInfo, MyInfo needs to be added separately (using IRC.me).
|
280
|
281
|
*
|
|
@@ -286,7 +287,7 @@ public class IRCParser implements SecureParser, Runnable {
|
286
|
287
|
*
|
287
|
288
|
* @param myDetails Client information.
|
288
|
289
|
*/
|
289
|
|
- public IRCParser(final MyInfo myDetails) { this(myDetails, null); }
|
|
290
|
+ public IRCParser(final MyInfo myDetails) { this(myDetails, (ServerInfo) null); }
|
290
|
291
|
/**
|
291
|
292
|
* Constructor with ServerInfo and MyInfo.
|
292
|
293
|
*
|
|
@@ -300,6 +301,18 @@ public class IRCParser implements SecureParser, Runnable {
|
300
|
301
|
resetState();
|
301
|
302
|
}
|
302
|
303
|
|
|
304
|
+ /**
|
|
305
|
+ * Creates a new IRCParser with the specified client details which will
|
|
306
|
+ * connect to the specified URI.
|
|
307
|
+ *
|
|
308
|
+ * @since 0.6.3m3
|
|
309
|
+ * @param myDetails The client details to use
|
|
310
|
+ * @param uri The URI to connect to
|
|
311
|
+ */
|
|
312
|
+ public IRCParser(final MyInfo myDetails, final URI uri) {
|
|
313
|
+ this(myDetails, new ServerInfo(uri));
|
|
314
|
+ }
|
|
315
|
+
|
303
|
316
|
/**
|
304
|
317
|
* Get the current OutputQueue
|
305
|
318
|
*
|