Sfoglia il codice sorgente

Fix twitter parser showing error when trying to rejoin &twitter

Fixes CLIENT-149

Change-Id: I02748a320a68dc64a3dc1d982c6afcec187dbde2
Reviewed-on: http://gerrit.dmdirc.com/1748
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.6.5
Chris Smith 13 anni fa
parent
commit
b486565a7e
1 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. 9
    4
      src/com/dmdirc/addons/parser_twitter/Twitter.java

+ 9
- 4
src/com/dmdirc/addons/parser_twitter/Twitter.java Vedi File

270
         for (final ChannelJoinRequest request : channels) {
270
         for (final ChannelJoinRequest request : channels) {
271
             final String channel = request.getName().trim();
271
             final String channel = request.getName().trim();
272
 
272
 
273
-            if (isValidChannelName(channel) && getChannel(channel) == null && !channel.equalsIgnoreCase(mainChannelName)) {
273
+            if (channel.equalsIgnoreCase(mainChannelName)) {
274
+                // The client is always in this channel, so ignore joins for it
275
+                continue;
276
+            }
277
+
278
+            if (isValidChannelName(channel) && getChannel(channel) == null) {
274
                 final TwitterChannelInfo newChannel = new TwitterChannelInfo(channel, this);
279
                 final TwitterChannelInfo newChannel = new TwitterChannelInfo(channel, this);
275
                 newChannel.addChannelClient(new TwitterChannelClientInfo(newChannel, myself));
280
                 newChannel.addChannelClient(new TwitterChannelClientInfo(newChannel, myself));
276
                 if (channel.matches("^&[0-9]+$")) {
281
                 if (channel.matches("^&[0-9]+$")) {
975
 
980
 
976
     /**
981
     /**
977
      * Send a Debug Message using the parser debug api.
982
      * Send a Debug Message using the parser debug api.
978
-     * 
983
+     *
979
      * @param code Debug Code for the message.
984
      * @param code Debug Code for the message.
980
      * @param message Content of the message.
985
      * @param message Content of the message.
981
      */
986
      */
1522
 
1527
 
1523
     /**
1528
     /**
1524
      * This method will send data to the NumericListener and the DataInListener
1529
      * This method will send data to the NumericListener and the DataInListener
1525
-     * 
1530
+     *
1526
      * @param numeric Numeric
1531
      * @param numeric Numeric
1527
      * @param token Tokenised Representation.
1532
      * @param token Tokenised Representation.
1528
      */
1533
      */
1560
 
1565
 
1561
     /**
1566
     /**
1562
      * Let the user know twitter failed in some way.
1567
      * Let the user know twitter failed in some way.
1563
-     * 
1568
+     *
1564
      * @param message Message to send to the user
1569
      * @param message Message to send to the user
1565
      */
1570
      */
1566
     private void twitterFail(final String message) {
1571
     private void twitterFail(final String message) {

Loading…
Annulla
Salva