This is something I stumbled upon by accident when analyzing things in ArchiBoT.
Valve actually does tell us all steamIDs we have pending messages from BEFORE we even ask for offline messages, so we can use that info in order to check if there is actually anybody permitted to use commands, if not, we can skip asking for those messages as they'd not result in executing any command anyway, and this way we can skip marking messages as read when there is nothing interesting for us to see.
There's too high chance Valve servers will get it in wrong order when not using delay, 300ms is sufficient in ArchiBoT, so we make it 500ms in ASF. There's no delay enforced when message is not being split.
Previously we always skipped first shutdown event, which is appropriate but only if we actually don't have anything to farm, so owner of account can execute command and redeem keys when given bot is !started without a trouble of bot instantly turning off.
Add proper routine for stopping bot immediately if either we farmed something already, or if IdleFarmingPeriod is 0
> @Ryzhehvost: Archi, I was talking in #general-russian with a user today, and he told me that in multi-user configuration (part of bots have one master, other part - another), if forwarding or/and distribution is enabled, keys would be forwarded/distributed to any bot, not to the bots of same master. I took a look at code, and seems he is right. Maybe this should be fixed? Without that multi-user configuration is not very useful...