From: Felipe C. <al5...@ma...> - 2002-12-22 06:54:09
|
I've uploaded a patch to SF that changes the way aliasing and renaming works, and adds suport for what I called nicks. Please check it. Any constructive comments are welcome specially what changes should be made so it goes to cvs. http://sourceforge.net/tracker/?func=detail&aid=639560&group_id=235&atid=300235 How I did it ------------ First, I added two fields called alias (how we call a buddy) and nick (how the buddy calls himself, or at least what the server says). Then I removed handle_buddy_rename since I don't it should be used for aliasing buddies, and much less to update their nicks. So I created a similar function called update_buddy_show which is basically the same but only the ui part. Then I created alias_buddy, nick_buddy and rename_buddy which will do the proper changes to the fields, and then call update_buddy_show to display the changes. I also added a function called serv_got_nick since the server is the only one that can update a nick. Politics -------- First of all the show field is the one that will contain what will be displayed. So. If there is an alias, "show" will be that alias. If not, but there is a nick, then "show" is the nick. If anything else then "show" will be the screen name. The Results ----------- This is a little bit harder to explain, so I'll explain different cases: (a) When the server doesn't update the nicks for your buddies: You won't notice anything. (b) When the server update the nicks for your buddies, but you have set an alias for them: You'll see their nick in the tooltip on the buddy list, and when you set his alias you'll see it in another field, just for reference. That's all. (c) When the server updates the nicks and you don't have an alias for them: Instead of an alias or screen name you will see the nick which will be updating constantly whenever the server says it has changed. Notes ----- The nick is NOT the alias. You specify the alias, and it's stored on the blist files. You don't specify the nick, it's updated by the server and it's not stored on blist files. -- Felipe Contreras |