Citrinate / FreePackages

An ASF plugin for finding and redeeming free Steam games
Apache License 2.0
117 stars 6 forks source link

Add a status command #8

Closed woctezuma closed 12 months ago

woctezuma commented 12 months ago

It could be useful to have a status command to print the following information:

2023-10-07 10:12:08|dotnet-6752|INFO|Bot|ProcessQueue() Pausing free package activations until 11:13:03

And maybe, if the activations are not paused, then the current state, e.g. 25/N packages activated in the past hour, where N is the user-input rate-limit.

Citrinate commented 12 months ago

Added 3 commands. New version should be out next week. You can test it here: FreePackages V1.1.0.zip

Command Access Description
clearfreepackagesqueue [Bots] Master Removes everything from the given bot's free packages queue
queuestatus [Bots] Master Prints the status of the given bot's free packages queue
queuelicense [Bots] <Licenses> Master Adds given licenses, explained here, to the given bot's free packages queue
queuelicense^ [Bots] <Licenses> Master Adds given licenses, explained here, to the given bot's free packages queue using that bot's package filters

Command Aliases

Command Alias
queuestatus asf qsa
queuelicense queuelicence, qlicense, qlicence
queuelicense^ queuelicence^, qlicense^, qlicence^
woctezuma commented 12 months ago

Perfect! Thank you!

woctezuma commented 12 months ago

There is one issue.

If one of the bots (here Bot_NO_PLUGIN) does not use the plugin, then the command qsa:

The configuration is as such:

>> Entrer la commande : qsa
<> Exécution en cours...
<< <Bot> 0 free packages queued.  2/40 hourly activations used.
<Bot_NO_PLUGIN> Ce bot n’est pas connecté !
<Bot_WITH_PLUGIN> 4881 free packages queued.  40/40 hourly activations used. Activations will resume at 23:39:19.
>> Entrer la commande : start Bot_NO_PLUGIN
<> Exécution en cours...
<< <Bot_NO_PLUGIN> Fait !

>> Entrer la commande : qsa
<> Exécution en cours...
<< <Bot> Commande inconnue !
>> Entrer la commande : stop Bot_NO_PLUGIN
<> Exécution en cours...
<< <Bot_NO_PLUGIN> Fait !

>> Entrer la commande : qsa
<> Exécution en cours...
<< <Bot> 0 free packages queued.  2/40 hourly activations used.
<Bot_NO_PLUGIN> Ce bot n’est pas connecté !
<Bot_WITH_PLUGIN> 4881 free packages queued.  40/40 hourly activations used. Activations will resume at 23:39:19.
woctezuma commented 12 months ago

Adding "EnableFreePackages": false, to the configuration of Bot_NO_PLUGIN does not solve the issue.

Citrinate commented 12 months ago

This should fix that: FreePackages V1.1.0.zip

woctezuma commented 12 months ago

Thanks! This works!