Pārlūkot izejas kodu

Bugfixes and update some class references

tags/v0.1^2
Ben Kurtovic pirms 12 gadiem
vecāks
revīzija
35f3075c63
4 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. +2
    -1
      earwigbot/commands/help.py
  2. +2
    -1
      earwigbot/commands/threads.py
  3. +2
    -2
      earwigbot/irc/frontend.py
  4. +1
    -1
      earwigbot/irc/watcher.py

+ 2
- 1
earwigbot/commands/help.py Parādīt failu

@@ -22,8 +22,9 @@


import re import re


from earwigbot.classes import BaseCommand, Data
from earwigbot import commands from earwigbot import commands
from earwigbot.classes import BaseCommand
from earwigbot.irc import Data


class Command(BaseCommand): class Command(BaseCommand):
"""Displays help information.""" """Displays help information."""


+ 2
- 1
earwigbot/commands/threads.py Parādīt failu

@@ -24,8 +24,9 @@ import threading
import re import re


from earwigbot import tasks from earwigbot import tasks
from earwigbot.classes import BaseCommand, Data, KwargParseException
from earwigbot.classes import BaseCommand
from earwigbot.config import config from earwigbot.config import config
from earwigbot.irc import KwargParseException


class Command(BaseCommand): class Command(BaseCommand):
"""Manage wiki tasks from IRC, and check on thread status.""" """Manage wiki tasks from IRC, and check on thread status."""


+ 2
- 2
earwigbot/irc/frontend.py Parādīt failu

@@ -56,13 +56,13 @@ class Frontend(IRCConnection):
data = Data(line) # New Data instance to store info about this line data = Data(line) # New Data instance to store info about this line


if line[1] == "JOIN": 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] data.chan = line[2]
# Check for 'join' hooks in our commands: # Check for 'join' hooks in our commands:
commands.check("join", data) commands.check("join", data)


elif line[1] == "PRIVMSG": 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.msg = " ".join(line[3:])[1:]
data.chan = line[2] data.chan = line[2]




+ 1
- 1
earwigbot/irc/watcher.py Parādīt failu

@@ -42,7 +42,7 @@ class Watcher(IRCConnection):
def __init__(self, frontend=None): def __init__(self, frontend=None):
self.logger = logging.getLogger("earwigbot.watcher") self.logger = logging.getLogger("earwigbot.watcher")
cf = config.irc["watcher"] cf = config.irc["watcher"]
base = super(Frontend, self)
base = super(Watcher, self)
base.__init__(cf["host"], cf["port"], cf["nick"], cf["ident"], base.__init__(cf["host"], cf["port"], cf["nick"], cf["ident"],
cf["realname"], self.logger) cf["realname"], self.logger)
self.frontend = frontend self.frontend = frontend


Notiek ielāde…
Atcelt
Saglabāt