diff --git a/earwigbot/commands/help.py b/earwigbot/commands/help.py index d0e2ba6..f8129a0 100644 --- a/earwigbot/commands/help.py +++ b/earwigbot/commands/help.py @@ -22,8 +22,9 @@ import re -from earwigbot.classes import BaseCommand, Data from earwigbot import commands +from earwigbot.classes import BaseCommand +from earwigbot.irc import Data class Command(BaseCommand): """Displays help information.""" diff --git a/earwigbot/commands/threads.py b/earwigbot/commands/threads.py index c822691..a7c5a1b 100644 --- a/earwigbot/commands/threads.py +++ b/earwigbot/commands/threads.py @@ -24,8 +24,9 @@ import threading import re from earwigbot import tasks -from earwigbot.classes import BaseCommand, Data, KwargParseException +from earwigbot.classes import BaseCommand from earwigbot.config import config +from earwigbot.irc import KwargParseException class Command(BaseCommand): """Manage wiki tasks from IRC, and check on thread status.""" diff --git a/earwigbot/irc/frontend.py b/earwigbot/irc/frontend.py index e17513a..027c73f 100644 --- a/earwigbot/irc/frontend.py +++ b/earwigbot/irc/frontend.py @@ -56,13 +56,13 @@ class Frontend(IRCConnection): data = Data(line) # New Data instance to store info about this line if line[1] == "JOIN": - data.nick, data.ident, data.host = sender_regex.findall(line[0])[0] + data.nick, data.ident, data.host = self.sender_regex.findall(line[0])[0] data.chan = line[2] # Check for 'join' hooks in our commands: commands.check("join", data) elif line[1] == "PRIVMSG": - data.nick, data.ident, data.host = sender_regex.findall(line[0])[0] + data.nick, data.ident, data.host = self.sender_regex.findall(line[0])[0] data.msg = " ".join(line[3:])[1:] data.chan = line[2] diff --git a/earwigbot/irc/watcher.py b/earwigbot/irc/watcher.py index e06559a..be7328a 100644 --- a/earwigbot/irc/watcher.py +++ b/earwigbot/irc/watcher.py @@ -42,7 +42,7 @@ class Watcher(IRCConnection): def __init__(self, frontend=None): self.logger = logging.getLogger("earwigbot.watcher") cf = config.irc["watcher"] - base = super(Frontend, self) + base = super(Watcher, self) base.__init__(cf["host"], cf["port"], cf["nick"], cf["ident"], cf["realname"], self.logger) self.frontend = frontend