Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 910 forks source link

Handler is started 8-9 times on launch #1090

Closed CaptainJackas closed 7 years ago

CaptainJackas commented 7 years ago

When launching just the default bot with the default SimpleUserHandler.cs as handler, it seems that the handler is called 8-9 times on launch: name I used this code to for the output: public SimpleUserHandler (Bot bot, SteamID sid) : base(bot, sid) { Log.Success("started"); } Does anyone knows how to fix this?

BlueRaja commented 7 years ago

Intended behavior. UserHandlers are created once for each user the bot interacts with.

Unfortunately UserHandlers are also often used for things that are not user-specific, by necessity. That is not good design, but here we are.