|
@@ -338,6 +338,24 @@ public class IRCParser implements SecureParser, Runnable {
|
338
|
338
|
@Override
|
339
|
339
|
public URI getURI() { return server.getURI(); }
|
340
|
340
|
|
|
341
|
+ /** {@inheritDoc} */
|
|
342
|
+ @Override
|
|
343
|
+ public boolean compareURI(final URI uri) {
|
|
344
|
+ // Parse the given URI to set any defaults.
|
|
345
|
+ final ServerInfo si = new ServerInfo(uri);
|
|
346
|
+ final URI newURI = si.getURI();
|
|
347
|
+ // Get the old URI.
|
|
348
|
+ final URI oldURI = server.getURI();
|
|
349
|
+
|
|
350
|
+ // Check that protocol, host and port are the same.
|
|
351
|
+ // Anything else won't change the server we connect to just what we
|
|
352
|
+ // would do after connecting, so is not relevent.
|
|
353
|
+ return newURI.getScheme().equalsIgnoreCase(oldURI.getScheme()) &&
|
|
354
|
+ newURI.getHost().equalsIgnoreCase(oldURI.getHost()) &&
|
|
355
|
+ newURI.getPort() == oldURI.getPort();
|
|
356
|
+ }
|
|
357
|
+
|
|
358
|
+
|
341
|
359
|
/** {@inheritDoc} */
|
342
|
360
|
@Override
|
343
|
361
|
public Map<Object, Object> getMap() { return myMap; }
|