From cd5e994b940625ceea7f5e2a510452f7b7df2a35 Mon Sep 17 00:00:00 2001 From: Gordon Shumway <39967334+oddluck@users.noreply.github.com> Date: Sat, 13 Jul 2019 02:38:08 -0400 Subject: [PATCH] Update plugin.py --- Jeopardy/plugin.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Jeopardy/plugin.py b/Jeopardy/plugin.py index 104af94..90f9beb 100644 --- a/Jeopardy/plugin.py +++ b/Jeopardy/plugin.py @@ -503,16 +503,18 @@ class Jeopardy(callbacks.Plugin): pass try: schedule.removeEvent('next_%s' % channel) - except KeyError: - irc.error(_('No Jeopardy! game started.')) - if channel in self.games: - if self.games[channel].active: - self.games[channel].stop() - else: + except: + pass + try: + self.games[channel].stop() + del self.games[channel] + irc.reply(_('Jeopardy! stopped.')) + except: + try: del self.games[channel] - irc.reply(_('Jeopardy! stopped.')) - else: - irc.noReply() + return + except: + return stop = wrap(stop, ['channel'])