jtorchat / jtorchat-old

Academic, Java, p2p, Messaging, Messenger, cyptography
21 stars 12 forks source link

{myself} code is not working #38

Open zerotamaitsu opened 12 years ago

zerotamaitsu commented 12 years ago

Somebody needs to fix the "{myself}" routine, to ensure there is always a "{myself}" with the correct address.

It is needed for GUI Profile to work (maybe we need to activate the check before opening that GUI profile)

zerotamaitsu commented 12 years ago

Oh I see it works for 'fresh install'. (just did a fresh install of jtorchat)

Well what I mean, is if we find a user named "{myself}" and it doesn't match the current ID, we have to adjust that address so that it matches our current torchatID.

zerotamaitsu commented 12 years ago

(3:32:03) sama: 'myself' should only be a temporary display, ie the toString method return different if that buddy is ourself (3:32:17) sama: so that 'myself' can dynamically adapt if you send someone else your buddy list

Yea I agree with him. Just make sure the 'self' buddy is always present, and just do a toString method to display "{myself}"

ghost commented 12 years ago

I can change it that my Tor id is always in the buddy list and normally with the name myself but when a user want to change it this is no problem.

So myself must not always mean my tor id

Am 14.05.2012 09:16, schrieb zerotamaitsu:

(3:32:03) sama: 'myself' should only be a temporary display, ie the toString method return different if that buddy is ourself (3:32:17) sama: so that 'myself' can dynamically adapt if you send someone else your buddy list

Yea I agree with him. Just make sure the 'self' buddy is always present, and just do a toString method to display "{myself}"


Reply to this email directly or view it on GitHub: https://github.com/jtorchat/jtorchat/issues/38#issuecomment-5683845

Porlington commented 12 years ago

I pushed a tentative fix for '{Myself}' to my fork, it should work, but it's not tested. This should in turn fix the GUIProfile issue, though I think the GUIProfile settings should be handled in such a way that this is not possible to happen, but I am busy at the moment so I guess this will do. 64e6be6

zerotamaitsu commented 12 years ago

daux, if you got time, please test the tentative fix that daux has in his own repo.

This is the code changes porlington did https://github.com/Porlington/jtorchat/commit/64e6be6d29c1355c0f96df9765e1e7a042a02cbe

On Mon, May 14, 2012 at 3:10 PM, Porlington reply@reply.github.com wrote:

I pushed a tentative fix for '{Myself}' to my fork, it should work, but it's not tested. This should in turn fix the GUIProfile issue, though I think the GUIProfile settings should be handled in such a way that this is not possible to happen, but I am busy at the moment so I guess this will do. 64e6be6


Reply to this email directly or view it on GitHub: https://github.com/jtorchat/jtorchat/issues/38#issuecomment-5692539

ghost commented 12 years ago

Ok, following:

I have change, the one line to deactivate auto add myself as buddy (many version before because i want to have full control over my buddy list and the names of my buddys).

So myself only added when firststart is true. The only two problems (now) are the jtorchat icon in the bar and the profile menu but i want to fix it in the next version at the weekend.

By testing these i have found a bug, i can not delete buddys when they are offline (in the next start they are delete but not in the running session). (the bug come from adding remove_me --> i have forget one line --> fully connected

When this will fix at the weekend there is no ground to block deleting yourself. Or have i forget one?

daux2a

zerotamaitsu commented 12 years ago

porington is out of commission, so he can't help you, til a few weeks later.

I can't fully understand what you mean by "When this will fix at the weekend there is no ground to block deleting"

Anyhow the jtorchat buddylist variable array must have a 'loopback id' (Your torchatID), otherwise broadcast, and profile GUI won't work (and others I don't know).

As a compromise perhaps we can always add the 'loopback id' as a temporary user. (You may need to modify the code to support temporary users, we will also use it for temporary groupchat users).

hope that makes sense

dot points:

  1. Add support for temporary users (add a 'temporary user' flag to buddylist entries), temporary users will not be written into buddylist.ini .
  2. Always add the 'loopback address' as a temporary user on every single jtorchat startup.

This will give you control over your buddylist, and prepare us further for groupchat.

Maybe you can On Tue, May 15, 2012 at 2:23 PM, daux2a reply@reply.github.com wrote:

Ok, following:

I have change, the one line to deactivate auto add myself as buddy (many version before because i want to have full control over my buddy list and the names of my buddys).

So myself only added when firststart is true. The only two problems (now) are the jtorchat icon in the bar and the profile menu but i want to fix it in the next version at the weekend.

By testing these i have found a bug, i can  not delete buddys when they are offline (in the next start they are delete but not in the running session). (the bug come from adding remove_me --> i have forget one line --> fully connected

When this will fix at the weekend there is no ground to block deleting yourself. Or have i forget one?

daux2a


Reply to this email directly or view it on GitHub: https://github.com/jtorchat/jtorchat/issues/38#issuecomment-5717031

ghost commented 12 years ago

//I can't fully understand what you mean by "When this will fix at the //weekend there is no ground to block deleting"

I want to fix the problem at this weekend (0.7.11). At the list are: myself problem keeping windows on top update and buddy sync

Sorry for my english.

p.s. There are already temporary buddys: When someone send you a ping or try to connect, he add to the temp. list and only when he is fully connected then he will be saved. This with a few change can work with myself. This feature is for preventing ping floods.

meh commented 12 years ago

When someone send you a ping or try to connect, he add to the temp. list and only when he is fully connected then he will be saved.

The permanent save should only happen when the _addme packet is received.

ghost commented 12 years ago

When Ping or add_me is incoming jtorchat add the buddy temporary, only when jtorchat is fully connected with the other the buddy really saved.

meh commented 12 years ago

When Ping or add_me is incoming jtorchat add the buddy temporary, only when jtorchat is fully connected with the other the buddy really saved.

Even on fully connection, if the _addme packet hasn't been received, that buddy has to be treated as temporary, otherwise temporary additions for groupchats won't work properly.

ghost commented 12 years ago

Ok, now i understand what you mean. It is on the list for the weekend. thanks

zerotamaitsu commented 12 years ago

Cool.

Also am hoping you understood what porlington did to improve the edt. Just remember that any changes to the swing GUI, must be executed on the edt.

On Tue, May 15, 2012 at 3:44 PM, daux2a reply@reply.github.com wrote:

Ok, now i understand what you mean. It is on the list for the weekend. thanks


Reply to this email directly or view it on GitHub: https://github.com/jtorchat/jtorchat/issues/38#issuecomment-5719191