Added the option to !opt-in/opt-out [onlinebot only]
Fixed command & event threading Events are now threaded by event_type (i.e. all buddy_logon events get ran in the same one) Added default preferences Fixed recipe loading for multiple installs (i.e. on different machines)
This commit is contained in:
+4
-4
@@ -17,7 +17,7 @@ from core.upgrade import run_upgrades
|
||||
def get_config_from_env():
|
||||
config_obj = DictObject()
|
||||
for k, v in os.environ.items():
|
||||
if k.startswith("TYRBOT_"):
|
||||
if k.startswith("IGNCORE_"):
|
||||
keys = k[7:].lower().split("_")
|
||||
temp_config = config_obj
|
||||
for key in keys[:-1]:
|
||||
@@ -26,7 +26,7 @@ def get_config_from_env():
|
||||
if key not in temp_config:
|
||||
temp_config[key] = DictObject()
|
||||
temp_config = temp_config.get(key)
|
||||
logger.debug("overriding config value from env var '%s'" % k)
|
||||
logger.debug(f"overriding config value from env var '{k}'")
|
||||
if v.lower() == "true":
|
||||
v = True
|
||||
elif v.lower() == "false":
|
||||
@@ -46,7 +46,7 @@ try:
|
||||
print("Unknown bot specified. Please edit your ##botname##.start.sh accordingly to the instructions found in the README.")
|
||||
exit(0)
|
||||
logger = Logger("core.bootstrap")
|
||||
logger.info("Starting Tyrbot...")
|
||||
logger.info("Starting Bot...")
|
||||
mod = __import__(f'conf.{bot}', fromlist=['BotConfig'])
|
||||
config: BotConfig = getattr(mod, 'BotConfig')
|
||||
if sys.version_info < (3, 9):
|
||||
@@ -72,7 +72,7 @@ try:
|
||||
config.server.dimension = int(config.server.dimension)
|
||||
|
||||
if platform.system() == "Windows":
|
||||
os.system("title %s.%d" % (config.character, config.server.dimension))
|
||||
os.system(f"title {config.character}.{config.server.dimension:d}")
|
||||
|
||||
# paths to search for instances: core + module_paths
|
||||
paths = ["core"]
|
||||
|
||||
Reference in New Issue
Block a user