oddluck / limnoria-plugins

Limnoria plugins I wrote or forked.
Do What The F*ck You Want To Public License
39 stars 17 forks source link

[Jeopardy] Add slowMode option to the plugin #28

Closed TehPeGaSuS closed 3 months ago

TehPeGaSuS commented 4 years ago

Currently we have supybot.plugins.Jeopardy.inactiveShutoff which makes the bot stop the game after X unanswered questions.

With the option supybot.plugins.Jeopardy.slowMode [False|True], instead stopping the game because no one is playing or are actually busy, we'd have the game to slow down.

Basically this option would double the supybot.plugins.Jeopardy.delay and the supybot.plugins.Jeopardy.timeout time, until a user correctly answer which would reset the slowMode to the normal mode.

So, if we have supybot.plugins.Jeopardy.delay set to 60 and the supybot.plugins.Jeopardy.timeout set to 90, they'd be turned into 120 and 180 respectively.

Few things to take in account

  1. If plugins.Jeopardy.inactiveShutoff is >= 1, plugins.Jeopardy.slowMode would be automatically set to False
  2. If plugins.Jeopardy.slowMode is True, plugins.Jeopardy.inactiveShutoff would be automatically set to 0

I hope this is enough understandable.

Cheers!