Browse Source

Add getURI() to parser, fixes issue 3204

Change-Id: Ie82ce41dd626ef36f4c1f71934e92c418efb3d09
Reviewed-on: http://gerrit.dmdirc.com/124
Tested-by: Shane Mc Cormack <shane@dmdirc.com>
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.6.3
Shane Mc Cormack 14 years ago
parent
commit
857732b97e

+ 9
- 0
src/com/dmdirc/parser/interfaces/Parser.java View File

@@ -26,6 +26,7 @@ import com.dmdirc.parser.common.IgnoreList;
26 26
 import com.dmdirc.parser.common.CallbackManager;
27 27
 
28 28
 import com.dmdirc.parser.common.QueuePriority;
29
+import java.net.URI;
29 30
 import java.util.Collection;
30 31
 
31 32
 /**
@@ -157,6 +158,14 @@ public interface Parser extends Runnable {
157 158
      */
158 159
     boolean isValidChannelName(String name);
159 160
 
161
+    /**
162
+     * Get a URI that shows where this parser is connected to.
163
+     *
164
+     * @return URI that shows where this parser is connected to.
165
+     */
166
+    URI getURI();
167
+
168
+
160 169
     /**
161 170
      * Retrieves the name of the server that this parser is connected to.
162 171
      *

+ 4
- 1
src/com/dmdirc/parser/irc/IRCParser.java View File

@@ -330,6 +330,10 @@ public class IRCParser implements SecureParser, Runnable {
330 330
     @Override
331 331
     public void setBindIP(final String ip) { bindIP = ip; }
332 332
 
333
+    /** {@inheritDoc} */
334
+    @Override
335
+    public URI getURI() { return server.getURI(); }
336
+
333 337
     /**
334 338
      * Get the current Value of createFake.
335 339
      *
@@ -389,7 +393,6 @@ public class IRCParser implements SecureParser, Runnable {
389 393
      */
390 394
     public void setAddLastLine(final boolean newValue) { addLastLine = newValue; }
391 395
 
392
-
393 396
     /**
394 397
      * Get the current socket State.
395 398
      *

Loading…
Cancel
Save