Moved org finder to the core
Allowed viewing the most recent account logs by using !account log recent Allowed removing of chatbots Moved the so far hardcoded org prefixing into the DB, which allows dynamically changing them. Fix for orgrosters; org leaves are being detected now.
This commit is contained in:
@@ -134,7 +134,7 @@ class CommandService:
|
||||
return
|
||||
|
||||
for channel, label in self.channels.items():
|
||||
row = self.db.query_single("SELECT access_level, module, enabled, verified "
|
||||
row = self.db.query_single("SELECT access_level, module, enabled, verified, sub_command "
|
||||
"FROM command_config "
|
||||
"WHERE command = ? AND sub_command = ? AND channel = ?",
|
||||
[command, sub_command, channel])
|
||||
@@ -147,9 +147,9 @@ class CommandService:
|
||||
"VALUES (?, ?, ?, ?, ?, 1, 1)",
|
||||
[command, sub_command, access_level, channel, module])
|
||||
elif row.verified:
|
||||
if row.module != module:
|
||||
self.logger.warning("module different for different forms of command '%s' and sub_command '%s'" % (
|
||||
command, sub_command))
|
||||
if row.module != module and row.sub_command == sub_command:
|
||||
self.logger.warning(f"module different for different forms of command '{command}' "
|
||||
f"and sub_command '{sub_command}'")
|
||||
else:
|
||||
# mark command as verified
|
||||
self.db.exec("UPDATE command_config SET verified = 1, module = ? "
|
||||
|
||||
Reference in New Issue
Block a user