From 3fe0a8e59e433415796e3b6012472b1f2889422f Mon Sep 17 00:00:00 2001 From: Brian Stephan Date: Thu, 6 May 2021 09:28:54 -0500 Subject: [PATCH] initialize state stuff in __init__ this shouldn't practically matter but whatever --- history/ircplugin.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/history/ircplugin.py b/history/ircplugin.py index fa0543c..619103b 100644 --- a/history/ircplugin.py +++ b/history/ircplugin.py @@ -14,6 +14,13 @@ class History(Plugin): what_missed_regex = r'(?i)(what did I miss\?|did I miss anything\?)$' + def __init__(self, bot, connection, event): + """Initialize some tracking stuff.""" + super(History, self).__init__(bot, connection, event) + self.channel_history = {} + self.channel_participants = {} + self.channel_leave_points = {} + def start(self): """Set up the handlers.""" logger.debug("%s starting up", __name__) @@ -25,10 +32,6 @@ class History(Plugin): self.connection.reactor.add_global_regex_handler(['pubmsg', 'privmsg'], self.what_missed_regex, self.handle_what_missed, 60) - self.channel_history = {} - self.channel_participants = {} - self.channel_leave_points = {} - super(History, self).start() def stop(self):