dgw/sopel-duel

Ignore channel's last duel time in .dueloff

Closed this issue · 0 comments

dgw commented

The time_since_duel() check in exclude() (the .dueloff command handler) is meant to check the user's last duel only. But if the channel in which it is called is set to use the channel-wide timer instead, .dueloff will incorrectly refuse to turn off duels for any user, even if they have not recently initiated a duel.

exclude() needs time_since_duel() to have an optional kwarg specifying that it should use only the user's last action to calculate the returned value, and ignore the channel's last duel time.