{"action":"created","issue":{"url":"https://api.github.com/repos/pychess/pychess/issues/608","labels_url":"https://api.github.com/repos/pychess/pychess/issues/608/labels{/name}","comments_url":"https://api.github.com/repos/pychess/pychess/issues/608/comments","events_url":"https://api.github.com/repos/pychess/pychess/issues/608/events","html_url":"https://github.com/pychess/pychess/issues/608","id":56296514,"number":608,"title":"PyChess sets (pin, gin, availinfo) FICS vars to values that don't work well with other clients or telnet","user":{"login":"pychess","id":10670522,"avatar_url":"https://avatars.githubusercontent.com/u/10670522?v=3","gravatar_id":"","url":"https://api.github.com/users/pychess","html_url":"https://github.com/pychess","followers_url":"https://api.github.com/users/pychess/followers","following_url":"https://api.github.com/users/pychess/following{/other_user}","gists_url":"https://api.github.com/users/pychess/gists{/gist_id}","starred_url":"https://api.github.com/users/pychess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pychess/subscriptions","organizations_url":"https://api.github.com/users/pychess/orgs","repos_url":"https://api.github.com/users/pychess/repos","events_url":"https://api.github.com/users/pychess/events{/privacy}","received_events_url":"https://api.github.com/users/pychess/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pychess/pychess/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-02T21:34:19Z","updated_at":"2015-02-02T21:34:27Z","closed_at":null,"body":"Original [issue 608](https://code.google.com/p/pychess/issues/detail?id=608) reported by [dbodom](https://code.google.com/u/112986820331174496732/) 2010-10-30\n\n**What steps will reproduce the problem?**\n1. Create a FICS account and play with your favorite telnet client\n2. Download and start pychess, login to FICS using pychess with your previously created FICS account\n3. Login again into your FICS account using telnet: pychess scrambled all your settings without asking your permission.\n\nSettings changed includes also formula.\n\n**What is the expected output? What do you see instead?**\n\nI was expecting pychess to ASK me the permission to change my FICS settings, or even better, to adapt to them without making any change.\n\n**Does it happen every time?**\nYes.\n\n**What version of the product are you using?**\nLastest mercurial.\n\n**Did you use an installed version of PyChess or did you run in from a**\n**tarball/svn?**\nI run it from source.\n"},"comment":{"url":"https://api.github.com/repos/pychess/pychess/issues/comments/72542587","html_url":"https://github.com/pychess/pychess/issues/608#issuecomment-72542587","issue_url":"https://api.github.com/repos/pychess/pychess/issues/608","id":72542587,"user":{"login":"pychess","id":10670522,"avatar_url":"https://avatars.githubusercontent.com/u/10670522?v=3","gravatar_id":"","url":"https://api.github.com/users/pychess","html_url":"https://github.com/pychess","followers_url":"https://api.github.com/users/pychess/followers","following_url":"https://api.github.com/users/pychess/following{/other_user}","gists_url":"https://api.github.com/users/pychess/gists{/gist_id}","starred_url":"https://api.github.com/users/pychess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pychess/subscriptions","organizations_url":"https://api.github.com/users/pychess/orgs","repos_url":"https://api.github.com/users/pychess/repos","events_url":"https://api.github.com/users/pychess/events{/privacy}","received_events_url":"https://api.github.com/users/pychess/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T21:34:27Z","updated_at":"2015-02-02T21:34:27Z","body":"Original [comment 6.](https://code.google.com/p/pychess/issues/detail?id=608#c6) posted by [mattgatto](https://code.google.com/u/mattgatto/) 2010-11-04\n\n@comment 4, miasid.neofelis: Thanks for the info. AFAIK, it was never listed at the http://www.freechess.org/cgi-bin/Download/FICS\\_Download\\_Interface.cgi -> Linux webpage in the first place, so I'm not sure what they mean by  PyChess being \"unlisted\".\n\nTamás: These variables turn on server output of information about game starts/ends and player logins/status-changes which the pychess Players and Games tabs need in order to be updated automatically. The only way the player and game lists could function without changing the variables, would be to add a \"Refresh\" button to each tab which manually issued the games/players commands which provide the info, or to gobject.timeout\\_add the games/players commands (and maybe under the condition that the respective tab is being shown/focused). I think that the ideal fix for this would be, for the FICS server software to automatically set these particular variables (gin, pin and availinfo) to 0 upon login, and then individual clients can change them as needed after connecting to the server. There is simply no other full-proof way to handle this. Even if we forked a separate process which waited for pychess to exit, then logged in and reset their variables to what they were before pychess changed them, it wouldn't cover the case where the user's computer crashed while pychess was running and then they logged in on a separate computer with a different client like telnet. Also, even if Eboard/Jin/Xboard were patched to set these variables to values appropriate to their client (i.e. 0), it wouldn't help with the case where pychess crashed and the user logged in afterwards via telnet.\n\nI think it's unfair of whoever wrote this FICS Support reply to blame this issue on PyChess. Eboard/Jin/Xboard don't use or need these variables  (AFAIK) because they don't have player or game lists that are automatically updated. But why would the coders of the server software have created these variables if they weren't supposed to be changed or used? I don't see anything on any of the help pages on any of these variables that says that client software shouldn't change them, or that the client needs to change them back to their original value before exiting:\nhttp://www.freechess.org/Help/HelpFiles/v\\_pin.html\nhttp://www.freechess.org/Help/HelpFiles/v\\_gin.html\nhttp://www.freechess.org/Help/HelpFiles/v\\_availinfo.html\n\nHowever, since pychess is the only client currently in use that needs different values for these variables (AFAIK), and we don't want to make unneccessary work for the FICS helpers and admins, I guess we need to fix it as best we can until the server is fixed, which may never happen. I think the best and easiest immediate workaround would be to A) hard set (gin, pin, availinfo) back to 0 upon logout, B) work on making sure that the logout handler is called whenever possible (i.e. whenever we exit from a situation where a signal or exception handler could have run cleanup routines like logout before exiting), and maybe C) warn the user, the first time they login as a registered user, something like:\n\n\"Warning: If you use PyChess with other FICS clients, and PyChess or your computer crashes while you're logged in with PyChess, you'll need to login and logout with PyChess once before logging in with a different client so that your FICS user variables are set to a state that make sense for a telnet session and Eboard/Jin/Xboard.\""}}