commit 616ff6d

grunfink  ·  2025-07-24 19:20:48 +0000 UTC
parent 620571b
New command-line command 'muted'.
1 files changed,  +11, -0
M main.c
M main.c
+11, -0
 1@@ -56,6 +56,7 @@ int usage(const char *cmd)
 2         "unblock {basedir} {instance_url}     Unblocks a full instance\n"
 3         "limit {basedir} {uid} {actor}        Limits an actor (drops their announces)\n"
 4         "unlimit {basedir} {uid} {actor}      Unlimits an actor\n"
 5+        "muted {basedir} {uid}                Lists the muted actors\n"
 6         "unmute {basedir} {uid} {actor}       Unmutes a previously muted actor\n"
 7         "verify_links {basedir} {uid}         Verifies a user's links (in the metadata)\n"
 8         "search {basedir} {uid} {regex}       Searches posts by content\n"
 9@@ -335,6 +336,16 @@ int main(int argc, char *argv[])
10         return 0;
11     }
12 
13+    if (strcmp(cmd, "muted") == 0) { /** **/
14+        xs *l = muted_list(&snac);
15+        const char *v;
16+
17+        xs_list_foreach(l, v)
18+            printf("%s\n", v);
19+
20+        return 0;
21+    }
22+
23     if ((url = GET_ARGV()) == NULL)
24         return usage(cmd);
25