Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irc users not updated? #37

Open
frankystone opened this issue Sep 17, 2018 · 16 comments
Open

irc users not updated? #37

frankystone opened this issue Sep 17, 2018 · 16 comments

Comments

@frankystone
Copy link
Contributor

frankystone commented Sep 17, 2018

Yesterday i was in irc and was disconnected for a short time, resulting in changing my username from 'kaputtnik' to 'kaputtnik_'. After switching my username to kaputtnik again and verifying by /msg NickServe identify my username on irc got changed.

Today i have opened the lobby (throughout the game) and found a user called 'kaputtnik_' from irc. Then i started my irc client, to see if such a user is on irc, but it wasn't. The lobby shows me two users on irc then: one 'kaputtnik_' and one 'kaputtnik', whereas the user 'kaputtnik_' does not show up in the irc users list of the irc client.

Sorry can't explain better :-(

@Notabilis
Copy link
Contributor

Thanks for the bug report, unfortunately it is not that surprising. I also noticed another "ghost" user in the lobby some time ago. But your description is actually helpful in fixing this.
The problem is that IRC offers quite some commands to notify about leaving IRC users and seemingly not all of them are handled by the metaserver. So if one not supported way of leaving the IRC server is used, the user in the lobby stays behind. It is not really helping that I have no idea about IRC. ;-)

So, how were your name changes going on? Changing to 'kaputtnik_' happened automatically on login because 'kaputtnik' was already in use? And then you changed your name without logging out and in again? If I am understanding this right, then I guess I have to look into supporting the "user changed name" command, thanks!

@frankystone
Copy link
Contributor Author

So, how were your name changes going on? Changing to 'kaputtnik_' happened automatically on login because 'kaputtnik' was already in use?

Yes, i think so.

And then you changed your name without logging out and in again?

Yes, i think so. I had to confirm the username with the command '/msg NickServe identify though.

Every time i get into the lobby i am shown as irc user 'kaputtnik_', but i am not logged in on irc...

@Notabilis
Copy link
Contributor

Thanks for the confirmation, I will look into it.

The user 'kaputtnik_' will stay there until the IRC bridge receives a messages saying it logged out. I think you should be able to "fix" it by logging into IRC as 'kaputtnik_' and doing a regular logout. As an alternative, just ignore it until someone restarts the metaserver.

@frankystone
Copy link
Contributor Author

Looks like it worked to login as 'kaputtnik_' and logout. Thanks.

@Notabilis
Copy link
Contributor

Since I failed to find a documentation how the rename is done, I deployed a branch that should log all IRC messages the metaserver receives. Could you please login on IRC, rename yourself and logout again? That should leave a ghost in the lobby and hopefully some useful log entries to fix this issue. If you do so, please tell me the date and time so I can find the matching log entry easier. :-)

@frankystone
Copy link
Contributor Author

I am AFK right now ... so i can do that in around 7 days.

@Notabilis
Copy link
Contributor

No problem, thanks!

@frankystone
Copy link
Contributor Author

frankystone commented Oct 31, 2018

Here is a log with timestamps:

Entry:
[Mittwoch, 31. Oktober 2018] [11:31:33 CET] Betreten Sie (~kaputtnik[...]) haben den Kanal #widelands betreten.

Renaming:
[Mittwoch, 31. Oktober 2018] [11:33:10 CET] Spitzname Sie sind jetzt als kaputtnik2 bekannt.

After starting widelands and joining the metaserver:
[Mittwoch, 31. Oktober 2018] [11:34:01 CET] kaputtnik1 has joined the lobby.

Then i have quitted IRC. Now there is a ghost: 'kaputtnik'

Hope this helps.. i am not that familiar with IRC commands :-S

@Notabilis
Copy link
Contributor

Thanks, that helped a lot!
Based on the log output you created I was able to add some code to react to rename events. Hopefully this solves the ghost situation.

@frankystone
Copy link
Contributor Author

I want to test what happened if the internet connection is lost, before you remove the additional log entrys. Will do it this afternoon and report again.

@Notabilis
Copy link
Contributor

No problem, I will wait until you are done. If you want, I could also deploy a branch with the fix and the additional log output.

@frankystone
Copy link
Contributor Author

Sorry, yesterday it get too late. Here are the attempts from this morning:

Login:
[Samstag, 3. November 2018] [10:34:36 CET] Betreten Sie (~kaputtnik[...]) haben den Kanal #widelands betreten.

After disabling Wlan and reconnect again:
[Samstag, 3. November 2018] [10:36:26 CET] Spitzname Spitzname wird bereits benutzt. kaputtnik_ wird versucht.

Leaving freenode server:
[Samstag, 3. November 2018] [10:36:35 CET] Beenden kaputtnik (~kaputtnik[...]) hat diesen Server verlassen (Read error: Connection reset by peer).

Reconnect to freenode again. I was renamed to kaputtnik_ and identifyed myself as kaputtnik_:
[Samstag, 3. November 2018] [10:36:35 CET] Notice -NickServ- kaputtnik_ is not a registered nickname.

Another command: Set myself "away" (my name is grayed out to show that i am currently not available for other users):
[10:49] [Abwesend] Sie sind nun als abwesend markiert (Grund: Gone away for now).

Maybe the last command can also be implemented into the metaserver to restrict the shown names in the lobby to users who are really active?

@Notabilis
Copy link
Contributor

No problem, thanks for testing.
The only log entry your test created is a line about changing your nickname at 10:30. Login/Logout isn't logged, so that is fine. It is a bit strange that your "away" command haven't created any log entry, though.
I deployed a metaserver that has the fix for the rename-command included but is also logging all IRC commands. Do you want to test the "away" command again? Maybe it will create a log entry this time.

@frankystone
Copy link
Contributor Author

frankystone commented Nov 11, 2018

Do you want to test the "away" command again? Maybe it will create a log entry this time.

I don't how the IRC works in detail, but i guess the away command is only used on server side. E.g. if i open my IRC program some users are shown as 'away', or 'inactive', after a short time. I guess my IRC program gets the users list and then queries the state of each user from the server. Don't know...

Maybe you want to install a IRC program yourself. Quassel ( http://www.quassel-irc.org/ ) seems to be a good one.

@Notabilis
Copy link
Contributor

Now that you mention it: I can indeed test that one myself. Thanks for reminding me, somehow it didn't occur to me. ^^

Unfortunately my testing and further internet research didn't turn up anything. The "away" status seems indeed be server side (or maybe only at your local client?) and I haven't noticed any matching entries on the metaserver. So if you don't insist on that feature, I won't (try to) implement it for now.

@frankystone
Copy link
Contributor Author

I found out calling the command /whois nickname retrieves some information. I get into IRC with the Webchat provided by the website, where i get the username widelands_6. Then i started my IRC client and get the username kaputtnik. After switching away mode in my client, i executed the command "/whois kaputtnik" in the webchat and got:

[22:48] == kaputtnik [~kaputtnik@....]
[22:48] == realname : kaputtnik
[22:48] == channels : #widelands
[22:48] == server : card.freenode.net [Washington, DC, US]
[22:48] == away : Ping me, maybe i notice it
[22:48] == account : kaputtnik
[22:48] == End of WHOIS

Then i have unset set the away mode in my client and run "/whois kaputtnik" again in the webchat:

kaputtnik [~kaputtnik@....]
[22:49] == realname : kaputtnik
[22:49] == channels : #widelands
[22:49] == server : card.freenode.net [Washington, DC, US]
[22:49] == account : kaputtnik
[22:49] == End of WHOIS

So it seems that querying the /whois nickname command for the keyword away should do the trick.

But feel free to implement it :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants