Don't import some nemubot module automatically
This commit is contained in:
parent
7c7b63634b
commit
06c85289e0
@ -7,6 +7,7 @@ import sys
|
||||
from datetime import datetime, timezone
|
||||
import shlex
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.message import TextMessage, Command
|
||||
|
||||
|
@ -6,6 +6,7 @@ import re
|
||||
import sys
|
||||
from datetime import date, datetime
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools.countdown import countdown_format
|
||||
from nemubot.tools.date import extractDate
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from nemubot.event import ModuleEvent
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools.countdown import countdown_format
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import urllib
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -6,6 +6,7 @@ from collections import defaultdict
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
from nemubot.tools.web import striphtml
|
||||
|
@ -10,6 +10,7 @@ import time
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.event import ModuleEvent
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools.date import extractDate
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
import urllib.parse
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.tools import web
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
@ -6,6 +6,7 @@ import json
|
||||
import re
|
||||
import urllib.parse
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
"""Various network tools (w3m, w3c validator, curl, traceurl, ...)"""
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
@ -16,8 +17,6 @@ from . import whois
|
||||
|
||||
def load(context):
|
||||
for mod in [isup, page, w3c, watchWebsite, whois]:
|
||||
mod.IRCException = IRCException
|
||||
mod.ModuleEvent = ModuleEvent
|
||||
mod.add_event = add_event
|
||||
mod.del_event = del_event
|
||||
mod.save = save
|
||||
|
@ -5,6 +5,7 @@ import tempfile
|
||||
import urllib
|
||||
|
||||
from nemubot import __version__
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.tools import web
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ import json
|
||||
import urllib
|
||||
|
||||
from nemubot import __version__
|
||||
from nemubot.exception import IRCException
|
||||
|
||||
def validator(url):
|
||||
"""Run the w3c validator on the given URL
|
||||
|
@ -4,6 +4,8 @@ from random import randint
|
||||
import urllib.parse
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from nemubot.event import ModuleEvent
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools.xmlparser.node import ModuleState
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import datetime
|
||||
import urllib
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.tools.web import getJSON
|
||||
|
||||
from more import Response
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
"""Informe les usagers des prochains passages des transports en communs de la RATP"""
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from more import Response
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import re
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import random
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
import urllib.parse
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
from nemubot.tools.web import striphtml
|
||||
|
@ -9,6 +9,7 @@ import urllib.error
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
|
||||
from .pyaspell import Aspell
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
from datetime import datetime
|
||||
import urllib
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import human
|
||||
from nemubot.tools.web import getJSON
|
||||
|
@ -5,6 +5,7 @@
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.tools import web
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import re
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -6,6 +6,7 @@ import datetime
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.tools import web
|
||||
|
||||
|
@ -8,6 +8,7 @@ import re
|
||||
from urllib.parse import quote
|
||||
from urllib.request import urlopen
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
@ -17,7 +18,7 @@ from more import Response
|
||||
API_URL="http://worldcup.sfg.io/%s"
|
||||
|
||||
def load(context):
|
||||
from event import ModuleEvent
|
||||
from nemubot.event import ModuleEvent
|
||||
add_event(ModuleEvent(func=lambda url: urlopen(url, timeout=10).read().decode(), func_data=API_URL % "matches/current?by_date=DESC", call=current_match_new_action, interval=30))
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@ import re
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import quote
|
||||
|
||||
from nemubot.exception import IRCException
|
||||
from nemubot.hooks import hook
|
||||
from nemubot.message import TextMessage
|
||||
from nemubot.tools import web
|
||||
|
@ -25,8 +25,6 @@ import os
|
||||
import sys
|
||||
|
||||
from nemubot import __version__
|
||||
from nemubot.event import ModuleEvent
|
||||
from nemubot.exception import IRCException
|
||||
import nemubot.hooks
|
||||
from nemubot.message import TextMessage
|
||||
from nemubot.tools.xmlparser import parse_file, module_state
|
||||
@ -153,10 +151,6 @@ class ModuleLoader(SourceFileLoader):
|
||||
module.save = lambda: False
|
||||
module.CONF = self.config
|
||||
|
||||
module.ModuleEvent = ModuleEvent
|
||||
module.ModuleState = module_state.ModuleState
|
||||
module.IRCException = IRCException
|
||||
|
||||
# Load dependancies
|
||||
if module.CONF is not None and module.CONF.hasNode("dependson"):
|
||||
module.MODS = dict()
|
||||
|
Loading…
Reference in New Issue
Block a user