@@ -6,7 +6,6 @@ import json | |||||
import re | import re | ||||
import urllib | import urllib | ||||
from config.watcher import * | |||||
from irc.base_command import BaseCommand | from irc.base_command import BaseCommand | ||||
class AFCStatus(BaseCommand): | class AFCStatus(BaseCommand): | ||||
@@ -22,7 +21,7 @@ class AFCStatus(BaseCommand): | |||||
data.command == "number" or data.command == "afc_status"): | data.command == "number" or data.command == "afc_status"): | ||||
return True | return True | ||||
try: | try: | ||||
if data.line[1] == "JOIN" and data.chan in AFC_CHANS: | |||||
if data.line[1] == "JOIN" and data.chan == "#wikipedia-en-afc": | |||||
return True | return True | ||||
except IndexError: | except IndexError: | ||||
pass | pass | ||||
@@ -3,7 +3,7 @@ | |||||
# Voice/devoice/op/deop users in the channel. | # Voice/devoice/op/deop users in the channel. | ||||
from irc.base_command import BaseCommand | from irc.base_command import BaseCommand | ||||
from config.irc import * | |||||
from core import config | |||||
class ChanOps(BaseCommand): | class ChanOps(BaseCommand): | ||||
def get_hooks(self): | def get_hooks(self): | ||||
@@ -19,7 +19,7 @@ class ChanOps(BaseCommand): | |||||
return False | return False | ||||
def process(self, data): | def process(self, data): | ||||
if data.host not in ADMINS: | |||||
if data.host not in config.irc.permissions["admins"]: | |||||
self.connection.reply(data, "you must be a bot admin to use this command.") | self.connection.reply(data, "you must be a bot admin to use this command.") | ||||
return | return | ||||
@@ -4,8 +4,8 @@ | |||||
import shlex, subprocess, re | import shlex, subprocess, re | ||||
from config.irc import * | |||||
from irc.base_command import BaseCommand | from irc.base_command import BaseCommand | ||||
from core import config | |||||
class Git(BaseCommand): | class Git(BaseCommand): | ||||
def get_hooks(self): | def get_hooks(self): | ||||
@@ -21,7 +21,7 @@ class Git(BaseCommand): | |||||
def process(self, data): | def process(self, data): | ||||
self.data = data | self.data = data | ||||
if data.host not in OWNERS: | |||||
if data.host not in config.irc.permissions["owners"]: | |||||
self.connection.reply(data, "you must be a bot owner to use this command.") | self.connection.reply(data, "you must be a bot owner to use this command.") | ||||
return | return | ||||
@@ -2,13 +2,13 @@ | |||||
# Manage wiki tasks from IRC, and check on thread status. | # Manage wiki tasks from IRC, and check on thread status. | ||||
import threading, re | |||||
import threading | |||||
import re | |||||
from irc.base_command import BaseCommand | from irc.base_command import BaseCommand | ||||
from irc.data import * | from irc.data import * | ||||
from wiki import task_manager | from wiki import task_manager | ||||
from config.main import * | |||||
from config.irc import * | |||||
from core import config | |||||
class Tasks(BaseCommand): | class Tasks(BaseCommand): | ||||
def get_hooks(self): | def get_hooks(self): | ||||
@@ -24,7 +24,7 @@ class Tasks(BaseCommand): | |||||
def process(self, data): | def process(self, data): | ||||
self.data = data | self.data = data | ||||
if data.host not in OWNERS: | |||||
if data.host not in config.irc.permissions["owners"]: | |||||
self.connection.reply(data, "at this time, you must be a bot owner to use this command.") | self.connection.reply(data, "at this time, you must be a bot owner to use this command.") | ||||
return | return | ||||
@@ -116,9 +116,9 @@ class Tasks(BaseCommand): | |||||
def get_main_thread_name(self): | def get_main_thread_name(self): | ||||
"""Return the "proper" name of the MainThread; e.g. "irc-frontend" or "irc-watcher".""" | """Return the "proper" name of the MainThread; e.g. "irc-frontend" or "irc-watcher".""" | ||||
if enable_irc_frontend: | |||||
if config.components["irc_frontend"]: | |||||
return "irc-frontend" | return "irc-frontend" | ||||
elif enable_wiki_schedule: | |||||
elif config.components["wiki_schedule"]: | |||||
return "wiki-scheduler" | return "wiki-scheduler" | ||||
else: | else: | ||||
return "irc-watcher" | return "irc-watcher" |