Closed tSpartak closed 11 years ago
What's your use case? Why do you need to log off your first account before logging into the second one? Why can't you log into both accounts at start?
In both accounts i'll do same actions, i want do it synchronous, and having method like this will reduce amount of code. Two accounts is just example.
That's not a use case. I need to know what exactly you're trying to do in the end.
(To clarify, I'm asking this because this might affect the API.)
I have a use-case which would benefit from this, I have an IRC bot with a Steam plugin, and I want to add a "reload" command to the bot to reload its config without any downtime. To do that I have a reloadConfig hook for all plugins to write logic for; the Steam plugin hooks into this and if the Steam username changes the plugin would try to change the account it is using: the problem here was there is no logOff method, and I couldn't figure out how to terminate the previous Steam instance before spawning a new one - I was ending up with multiple Steam bots online each doing the same job.
The steam plugin in question: https://github.com/RJacksonm1/irc_rbotson/blob/jsonconfig/plugins/steam_relay.js
For my part, I'm doing a web interface which permits to control the bot (Launch it, log it, trade with someone ...) and it would be really interesting to have a method to logOff the bot, or to end the bot, when the user has finished with the bot.
For example i want to do something like this: