Bug 149912 - [IRC] Name changes are not detected internally
Summary: [IRC] Name changes are not detected internally
Status: RESOLVED DUPLICATE of bug 202004
Alias: None
Product: ECF
Classification: RT
Component: ecf.providers (show other bugs)
Version: 1.0.1   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 1.1.0   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on: 202004
Blocks:
  Show dependency tree
 
Reported: 2006-07-06 17:48 EDT by Remy Suen CLA
Modified: 2014-02-14 16:06 EST (History)
3 users (show)

See Also:


Attachments
patch (10.76 KB, patch)
2007-07-27 13:04 EDT, Jacek Pospychala CLA
no flags Details | Diff
updated patch (10.89 KB, patch)
2007-09-02 10:28 EDT, Jacek Pospychala CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2006-07-06 17:48:29 EDT
Currently, the IRC servers itself picks up the name change, but the userName field within org.eclipse.ecf.ui.views.ChatRoomManagerView does not. This causes the nickname highlighting feature requested in bug #148875 to not work if the user changes his or her nickname since no matches can be made.
Comment 1 Scott Lewis CLA 2007-07-22 20:54:35 EDT
Setting target milestone to 1.0.2.  Hopefully this can be addressed on bugday and subsequently included in 1.0.2.
Comment 2 Jacek Pospychala CLA 2007-07-26 10:18:42 EDT
I am addressing this on bugday
Comment 3 Jacek Pospychala CLA 2007-07-26 10:23:25 EDT
this and bug 197329 look similar. If I am correct, it's all about to somehow populate events from IRCEventHandler attached in IRCRootContainer to proper chatrooms.
A working example is Kick, that is already notified in the chatroom.
Comment 4 Chris Aniszczyk CLA 2007-07-26 10:24:02 EDT
it's yours :D
Comment 5 Jacek Pospychala CLA 2007-07-27 13:04:11 EDT
Created attachment 74811 [details]
patch

Nickname change events go the same way as Leave and Join events.
The drawback is that, it forgets user properties, so for example, when @john changes nickname to frank, actually only frank (not @frank) will show up in participants list.
It could be solved if ECF maintained user IRC properties internally.
Comment 6 Jacek Pospychala CLA 2007-08-01 07:59:47 EDT
I wonder if you have had the chance to review this patch.
Comment 7 Chris Aniszczyk CLA 2007-08-01 11:05:37 EDT
It's on my list to do tonight.
Comment 8 Chris Aniszczyk CLA 2007-08-05 16:09:21 EDT
Hi Jacek, good patch, however, this makes some API additions so it will go into 1.1 which the stream opens for tomorrow. 1.0.2 should be released today or tomorrow.

Setting the target milestone for 1.1.0, please bother me again when it's 1.1 time :)
Comment 9 Remy Suen CLA 2007-09-02 08:36:18 EDT
(In reply to comment #5)
> Created an attachment (id=74811) [details]
> patch

Jacek, could you update this patch? As you can imagine, it no longer applies cleanly (considering that a month has passed) to CVS HEAD.
Comment 10 Jacek Pospychala CLA 2007-09-02 10:28:04 EDT
Created attachment 77538 [details]
updated patch
Comment 11 Jacek Pospychala CLA 2007-09-02 10:29:25 EDT
tested that it still works.
Comment 12 Remy Suen CLA 2007-09-02 11:52:44 EDT
(In reply to comment #10)
> Created an attachment (id=77538) [details]
> updated patch

I can't say that I like the call to 'handleArrived(IUser)' in the NICK_EVENT conditional clause in IRCChannelContainer given that no one is actually joining the chat room.
Comment 13 Jacek Pospychala CLA 2007-09-02 12:01:14 EDT
I was following javadoc in org.eclipse.ecf.presence.chatroom.IChatRoomParticipantListener.handleUpdated(IUser),
which says

"The ID of the changedParticipant (via changedParticipant.getID()) will match the ID of the previous notification handleArrived(IUser)."

So I thought there should be some handleArrived before handleUpdated.

What would make you happier then?
Comment 14 Jacek Pospychala CLA 2007-09-02 12:08:56 EDT
This is a bit hazardous, because afaik in IRC when user changes nickname, it's seen as previous ID totally disappeared and new ID showed up from nowhere.

so in this case only handlePresenceUpdated or handleUpdated is not really accurate, because the user that changed doesn't exist now under his original ID.

I quess the best would be to have a persistent ID, that doesn't change on nickname change, but that was too much for me, for bugday ;)

If you have a better idea or I missed something, please let me know!

We can eventually defer this bug, until better ID comes to support this case.
Comment 15 Remy Suen CLA 2007-09-02 12:38:39 EDT
(In reply to comment #13)
> "The ID of the changedParticipant (via changedParticipant.getID()) will match
> the ID of the previous notification handleArrived(IUser)."
> 
> So I thought there should be some handleArrived before handleUpdated.

I guess that the javadocs might need to be changed slightly, I don't know. :/ I think you'd agree with me on the fact that no one has actually joined the channel, though.

(In reply to comment #14)
> I quess the best would be to have a persistent ID, that doesn't change on
> nickname change, but that was too much for me, for bugday ;)

I agree. Fixing this is not trivial at all.

> We can eventually defer this bug, until better ID comes to support this case.

I am going to un-bugday this as it is not for the weak of heart. ;p
Comment 16 Jacek Pospychala CLA 2007-09-02 12:56:04 EDT
> (In reply to comment #14)
> > I quess the best would be to have a persistent ID, that doesn't change on
> > nickname change, but that was too much for me, for bugday ;)
> 
> I agree. Fixing this is not trivial at all.

Maybe if we used USER[1] name instead of NICK[2] name as an ID, that would solve the problem. The USER name (we often see it in /whois result) is the same during whole session, even if user changes nick. It also helps to build good /ban wildcards so kicked folks can't rejoin after nick change :)

I'll create a separate bug, and make this one depend on it.

[1] http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_1_3
[2] http://www.irchelp.org/irchelp/rfc/chapter4.html#c4_1_2
Comment 17 Jacek Pospychala CLA 2007-09-02 13:19:58 EDT
I added bug 202004
Comment 18 Scott Lewis CLA 2008-05-18 15:14:48 EDT
removing contributed for ip log.
Comment 19 Scott Lewis CLA 2014-02-14 16:06:07 EST
Given discussion, resolving as duplicate of 202004.

*** This bug has been marked as a duplicate of bug 202004 ***