Compare commits

..

2 Commits

4 changed files with 8 additions and 3 deletions

5
bot.py
View File

@ -106,6 +106,9 @@ class Fulvia(irc.IRCClient):
the URL module.
"""
self._disabled_modules = self.config.core.disabled_modules.split(",")
"""These modules will NOT be loaded when load_modules() is called."""
self.load_modules()
@ -126,6 +129,8 @@ class Fulvia(irc.IRCClient):
failed = 0
for name, path in modules.items():
try:
if name in self._disabled_modules:
continue
loader.load_module(self, path)
loaded += 1
except Exception as e:

View File

@ -11,7 +11,7 @@ from tools.calculation import eval_equation
BASE_TUMBOLIA_URI = 'https://tumbolia-two.appspot.com/'
@commands('c', 'calc')
@commands('calc', 'c')
@example('.c 5 + 3', '8')
def c(bot, trigger):
"""Evaluate some calculation."""

View File

@ -44,7 +44,7 @@ class MonitorThread(threading.Thread):
delete_reminder(self._bot, oldtime)
if not self._bot.memory["remind"] or not self._bot.stillConnected():
self.stop.set()
time.sleep(2.5)
self.stop.wait(2.5)
del self._bot.memory["remind_monitor"]

View File

@ -35,7 +35,7 @@ def title_auto(bot, trigger):
if broken:
continue
try:
res = requests.get(url, headers=HEADERS, verify=True)
res = requests.get(url, headers=HEADERS, verify=True, timeout=10)
except requests.exceptions.ConnectionError:
continue
try: