Closed Bug 955090 Opened 10 years ago Closed 10 years ago

Reconnecting with IRC causes nicks in ISON messages to duplicate

Categories

(Chat Core :: IRC, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: clokep)

Details

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 1661 by Douglas Thrift <douglaswth AT gmail.com> at 2012-08-22 22:20:00 UTC ***

While connecting to Freenode through a ZNC bouncer, I immediately get kicked for flooding. I don't think this will happen right away, so I think Instantbird needs to be connected for a little while and then have to reconnect to reproduce this. Investigating what happens when this occurs, I discovered in the following message was being sent in the Error Console:

Timestamp: 8/22/2012 2:33:37 PM
Warning: Sending:
MONITOR + CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,*status,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,*status,CharlesNorris,CharlesNorris,*status,CharlesNorris,*status,CharlesNorris,*status,*status
Source File: resource:///modules/socket.jsm
Line: 202
Source Code:
irc

----------------------------------------------------------------------------------

My buddy list only contains *status (the ZNC status nick) and CharlesNorris. So, it looks like the monitor is unnecessarily repeating the buddy list.
*** Original post on bio 1661 at 2012-08-22 22:42:38 UTC ***

via IRC: "The *status nick was probably added before 1.2, but I added another * nick with 1.2 and it has a different icon in the buddy list. I just removed *status and added it again and it still shows as online."
OS: Windows 7 → All
Hardware: x86 → All
*** Original post on bio 1661 at 2012-09-01 15:37:53 UTC ***

We discussed this a bit on IRC. Would it be possible for you to attach a complete log (after setting purple.debug.loglevel=1) from connection (to ZNC) up to the point the error occurs? (You can leave out any actual messages I guess.) Thanks!
Summary: Instantbird floods Freenode with MONITOR messages with repeated buddy list → IRC via ZNC Bouncer floods Freenode with MONITOR messages with repeated buddy list
*** Original post on bio 1661 at 2013-01-11 01:11:21 UTC ***

I've been able to reproduce this...patch coming up.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: IRC via ZNC Bouncer floods Freenode with MONITOR messages with repeated buddy list → Reconnecting with IRC causes buddies to duplicate
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1661 as attmnt 2185 at 2013-01-11 01:13:00 UTC ***

This clears the pendingIsOnQueue after using it, which fixes the issue of it duplicating.
Attachment #8353947 - Flags: review?(florian)
Assignee: nobody → clokep
Status: NEW → ASSIGNED
*** Original post on bio 1661 at 2013-01-11 16:12:56 UTC ***

Florian asked for some changes on IRC after some discussion:
1. Rename the methods since they're also used for WATCH and MONITOR and not only ISON.
2. Make sure there isn't code duplication warning!
3. Keep track of the indices in pendingIsOnQueue instead of splitting the array and concatenating them together.
Summary: Reconnecting with IRC causes buddies to duplicate → Reconnecting with IRC causes nicks in ISON messages to duplicate
Attached patch Patch v2Splinter Review
*** Original post on bio 1661 as attmnt 2186 at 2013-01-12 14:26:00 UTC ***

The changes in this patch:
1. _isOnQueue --> trackQueue
2. No major code duplication I can see.
3. pendingIsOnQueue is not changed, but trackQueue is always kept as the full list of nicks. I think this is something Florian originally suggested, and it seemed simpler then keeping track of indices.
Attachment #8353949 - Flags: review?(florian)
Comment on attachment 8353947 [details] [diff] [review]
Patch

*** Original change on bio 1661 attmnt 2185 at 2013-01-12 14:26:46 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353947 - Attachment is obsolete: true
Attachment #8353947 - Flags: review?(florian)
Comment on attachment 8353949 [details] [diff] [review]
Patch v2

*** Original change on bio 1661 attmnt 2186 at 2013-01-12 14:48:18 UTC ***

Thanks!
Attachment #8353949 - Flags: review?(florian) → review+
*** Original post on bio 1661 at 2013-01-16 01:50:38 UTC ***

Committed as http://hg.instantbird.org/instantbird/rev/eab4becb3c7f

Please let me know if this doesn't fix the issue!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4
You need to log in before you can comment on or make changes to this bug.