diff options
| author | 2025-07-24 21:20:48 +0200 | |
|---|---|---|
| committer | 2025-07-24 21:20:48 +0200 | |
| commit | 616ff6d59ed747d8ad2682613ffe7b7cb98f8cfe (patch) | |
| tree | ab78f109f953029050dfb5f69d4f4485b09b0aee | |
| parent | Fixed link in tags, when it's an RSS. (diff) | |
| download | penes-snac2-616ff6d59ed747d8ad2682613ffe7b7cb98f8cfe.tar.gz penes-snac2-616ff6d59ed747d8ad2682613ffe7b7cb98f8cfe.tar.xz penes-snac2-616ff6d59ed747d8ad2682613ffe7b7cb98f8cfe.zip | |
New command-line command 'muted'.
| -rw-r--r-- | main.c | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -56,6 +56,7 @@ int usage(const char *cmd) | |||
| 56 | "unblock {basedir} {instance_url} Unblocks a full instance\n" | 56 | "unblock {basedir} {instance_url} Unblocks a full instance\n" |
| 57 | "limit {basedir} {uid} {actor} Limits an actor (drops their announces)\n" | 57 | "limit {basedir} {uid} {actor} Limits an actor (drops their announces)\n" |
| 58 | "unlimit {basedir} {uid} {actor} Unlimits an actor\n" | 58 | "unlimit {basedir} {uid} {actor} Unlimits an actor\n" |
| 59 | "muted {basedir} {uid} Lists the muted actors\n" | ||
| 59 | "unmute {basedir} {uid} {actor} Unmutes a previously muted actor\n" | 60 | "unmute {basedir} {uid} {actor} Unmutes a previously muted actor\n" |
| 60 | "verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n" | 61 | "verify_links {basedir} {uid} Verifies a user's links (in the metadata)\n" |
| 61 | "search {basedir} {uid} {regex} Searches posts by content\n" | 62 | "search {basedir} {uid} {regex} Searches posts by content\n" |
| @@ -335,6 +336,16 @@ int main(int argc, char *argv[]) | |||
| 335 | return 0; | 336 | return 0; |
| 336 | } | 337 | } |
| 337 | 338 | ||
| 339 | if (strcmp(cmd, "muted") == 0) { /** **/ | ||
| 340 | xs *l = muted_list(&snac); | ||
| 341 | const char *v; | ||
| 342 | |||
| 343 | xs_list_foreach(l, v) | ||
| 344 | printf("%s\n", v); | ||
| 345 | |||
| 346 | return 0; | ||
| 347 | } | ||
| 348 | |||
| 338 | if ((url = GET_ARGV()) == NULL) | 349 | if ((url = GET_ARGV()) == NULL) |
| 339 | return usage(cmd); | 350 | return usage(cmd); |
| 340 | 351 | ||