From a539db96a2ce5c9cc26b1d46909416be74f2dc82 Mon Sep 17 00:00:00 2001 From: swee Date: Fri, 10 Jan 2025 18:43:50 -0800 Subject: [PATCH] Update server.py --- server.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/server.py b/server.py index d47864b..99b54a0 100644 --- a/server.py +++ b/server.py @@ -111,6 +111,23 @@ sqlproviderequires = {} for i in mods["sql_provider"].__ircat_requires__: sqlproviderequires[i.replace("-", "_")] = data[i] config = mods["sql_provider"].broker(**sqlproviderequires) +global socketListeners +socketListeners = [] +for i in mods['allsocket']: + requires = {} + for j in i.__ircat_requires__: + requires[j.replace("-", "_")] = data[j] + if "sql" in i.__ircat_giveme__: + requires["sql"] = config + socketListeners.append(i.IRCatModule(**requires)) +commandProviders = [] +for i in mods['command']: + requires = {} + for j in i.__ircat_requires__: + requires[j.replace("-", "_")] = data[j] + if "sql" in i.__ircat_giveme__: + requires["sql"] = config + commandProviders.append(i.IRCatModule(**requires)) sockets = {} sockets_ssl = {} # Open the specified non-SSL sockets.