diff --git a/plugins/Gameknot.py b/plugins/Gameknot.py index 9c49fa3c4..f2d52f519 100644 --- a/plugins/Gameknot.py +++ b/plugins/Gameknot.py @@ -68,15 +68,19 @@ def configure(onStart, afterConnect, advanced): onStart.append('Gameknot toggle stat off') -class Gameknot(callbacks.PrivmsgCommandAndRegexp, plugins.Toggleable): +class Gameknot(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable): threaded = True regexps = ['gameknotSnarfer', 'gameknotStatsSnarfer'] - toggles = plugins.ToggleDictionary({'game' : True, - 'stat' : True}) - def __init__(self): - callbacks.PrivmsgCommandAndRegexp.__init__(self) - plugins.Toggleable.__init__(self) - + configurables = plugins.ConfigurableDictionary( + [('game-snarfer', plugins.ConfigurableTypes.bool, True, + """Determines whether the game URL snarfer is active; if so, the bot + will reply to the channel with a summary of the game data when it + sees a Gameknot game on the channel."""), + ('stats-snarfer', plugins.ConfigurableTypes.bool, True, + """Determines whether the stats URL snarfer is active; if so, the bot + will reply to the channel with a summary of the stats of any player + whose stats URL is seen on the channel.""")] + ) _gkrating = re.compile(r'(\d+)') _gkgames = re.compile(r's: