Compare commits
2 Commits
8e28d83af4
...
6cb2a7a4f1
Author | SHA1 | Date | |
---|---|---|---|
6cb2a7a4f1 | |||
7a7da7bae7 |
5
bot.py
5
bot.py
|
@ -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:
|
||||
|
|
|
@ -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."""
|
||||
|
|
|
@ -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"]
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user