]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 21 Jun 2025 12:37:21 +0000 (14:37 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 21 Jun 2025 12:37:21 +0000 (14:37 +0200)
- added 'neko' as peer/blocklist source

daemon.py
fba/commands.py

index 6ee5717f800504c0da0ff37e80a88a81796b3be8..5ec02264ca80cb08787b36dc7b6604ed23cca876 100755 (executable)
--- a/daemon.py
+++ b/daemon.py
@@ -67,7 +67,7 @@ SELECT COUNT(domain) FROM instances) AS total_websites, \
     'peertube'  , 'takahe'  , 'gotosocial', 'brighteon', 'wildebeest' , \
     'bookwyrm'  , 'mitra'   , 'areionskey', 'mammuthus', 'neodb'      , \
     'smithereen', 'vebinet' , 'toki'      , 'snac'     , 'biblioreads', \
-    'wordpress' , 'oolong'  , 'diaspora'  , 'appy' \
+    'wordpress' , 'oolong'  , 'diaspora'  , 'appy'     , 'neko' \
 )) AS supported_instances, \
 (SELECT COUNT(blocker) FROM blocks) AS total_blocks, \
 (SELECT COUNT(domain) FROM instances WHERE last_error_details IS NOT NULL) AS erroneous_instances")
@@ -114,7 +114,7 @@ def api_scoreboard(mode: str, amount: int) -> None:
     elif mode == "obfuscator":
         database.cursor.execute("SELECT software AS data, COUNT(domain) AS score FROM instances WHERE has_obfuscation = 1 GROUP BY software ORDER BY score DESC LIMIT ?", [amount])
     elif mode == "obfuscation":
-        database.cursor.execute("SELECT has_obfuscation AS data, COUNT(domain) AS score FROM instances WHERE software IN ('pleroma', 'lemmy', 'mastodon', 'misskey', 'friendica') GROUP BY has_obfuscation ORDER BY score DESC LIMIT ?", [amount])
+        database.cursor.execute("SELECT has_obfuscation AS data, COUNT(domain) AS score FROM instances WHERE has_obfuscation = 1 GROUP BY has_obfuscation ORDER BY score DESC LIMIT ?", [amount])
     elif mode == "block_level":
         database.cursor.execute("SELECT block_level AS data, COUNT(rowid) AS score FROM blocks GROUP BY block_level ORDER BY score DESC LIMIT ?", [amount])
     else:
index cd931eafac2f84b0424ff9b9057519b0f1617423..62291a08126d48f384ea049d91d0ad81264eac42 100644 (file)
@@ -301,11 +301,11 @@ def fetch_blocks(args: argparse.Namespace) -> int:
     elif args.only_none:
         # Check only entries with total_blocked=None
         logger.debug("Checking only entries with total_blocked=None ...")
-        database.cursor.execute("SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed', 'typecho') AND nodeinfo_url IS NOT NULL AND total_blocks IS NULL ORDER BY last_blocked ASC, total_blocks DESC")
+        database.cursor.execute("SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed', 'typecho', 'neko') AND nodeinfo_url IS NOT NULL AND total_blocks IS NULL ORDER BY last_blocked ASC, total_blocks DESC")
     else:
         # Re-check after "timeout" (aka. minimum interval)
         logger.debug("Checking any federating software with possible blocklist ...")
-        database.cursor.execute("SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed', 'typecho') AND nodeinfo_url IS NOT NULL ORDER BY last_blocked ASC, total_blocks DESC")
+        database.cursor.execute("SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed', 'typecho', 'neko') AND nodeinfo_url IS NOT NULL ORDER BY last_blocked ASC, total_blocks DESC")
 
     # Load all rows
     rows = [dict(row) for row in database.cursor.fetchall()]
@@ -1056,7 +1056,7 @@ WHERE software IN ( \
     'peertube'  , 'takahe'  , 'gotosocial', 'brighteon', 'wildebeest' , \
     'bookwyrm'  , 'mitra   ', 'areionskey', 'mammuthus', 'neodb'      , \
     'smithereen', 'vebinet' , 'toki'      , 'snac'     , 'biblioreads', \
-    'wordpress' , 'oolong'  , 'diaspora'  , 'appy' \
+    'wordpress' , 'oolong'  , 'diaspora'  , 'appy'     , 'neko' \
 ) \
 ORDER BY total_peers DESC, last_response_time ASC, last_updated ASC"
     )