diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 12 |
1 files changed, 9 insertions, 3 deletions
| @@ -30,6 +30,7 @@ int usage(const char *cmd) | |||
| 30 | "upgrade {basedir} Upgrade to a new version\n" | 30 | "upgrade {basedir} Upgrade to a new version\n" |
| 31 | "adduser {basedir} [{uid}] Adds a new user\n" | 31 | "adduser {basedir} [{uid}] Adds a new user\n" |
| 32 | "deluser {basedir} {uid} Deletes a user\n" | 32 | "deluser {basedir} {uid} Deletes a user\n" |
| 33 | "update {basedir} {uid} Sends a user's updated profile\n" | ||
| 33 | "httpd {basedir} Starts the HTTPD daemon\n" | 34 | "httpd {basedir} Starts the HTTPD daemon\n" |
| 34 | "purge {basedir} Purges old data\n" | 35 | "purge {basedir} Purges old data\n" |
| 35 | "state {basedir} Prints server state\n" | 36 | "state {basedir} Prints server state\n" |
| @@ -354,7 +355,7 @@ int main(int argc, char *argv[]) | |||
| 354 | xs *lid = list_maint(&snac, url, 4); | 355 | xs *lid = list_maint(&snac, url, 4); |
| 355 | 356 | ||
| 356 | if (lid != NULL) { | 357 | if (lid != NULL) { |
| 357 | xs *lcont = list_content(&snac, lid, NULL, 0); | 358 | xs *lcont = list_members(&snac, lid, NULL, 0); |
| 358 | const char *md5; | 359 | const char *md5; |
| 359 | 360 | ||
| 360 | xs_list_foreach(lcont, md5) { | 361 | xs_list_foreach(lcont, md5) { |
| @@ -410,7 +411,7 @@ int main(int argc, char *argv[]) | |||
| 410 | if (valid_status(webfinger_request(account, &actor, &uid))) { | 411 | if (valid_status(webfinger_request(account, &actor, &uid))) { |
| 411 | xs *md5 = xs_md5_hex(actor, strlen(actor)); | 412 | xs *md5 = xs_md5_hex(actor, strlen(actor)); |
| 412 | 413 | ||
| 413 | list_content(&snac, lid, md5, 1); | 414 | list_members(&snac, lid, md5, 1); |
| 414 | printf("Actor %s (%s) added to list '%s' (%s)\n", actor, uid, url, lid); | 415 | printf("Actor %s (%s) added to list '%s' (%s)\n", actor, uid, url, lid); |
| 415 | } | 416 | } |
| 416 | else | 417 | else |
| @@ -433,7 +434,7 @@ int main(int argc, char *argv[]) | |||
| 433 | if (lid != NULL) { | 434 | if (lid != NULL) { |
| 434 | xs *md5 = xs_md5_hex(account, strlen(account)); | 435 | xs *md5 = xs_md5_hex(account, strlen(account)); |
| 435 | 436 | ||
| 436 | list_content(&snac, lid, md5, 2); | 437 | list_members(&snac, lid, md5, 2); |
| 437 | printf("Actor %s deleted from list '%s' (%s)\n", account, url, lid); | 438 | printf("Actor %s deleted from list '%s' (%s)\n", account, url, lid); |
| 438 | } | 439 | } |
| 439 | else | 440 | else |
| @@ -738,6 +739,11 @@ int main(int argc, char *argv[]) | |||
| 738 | return 0; | 739 | return 0; |
| 739 | } | 740 | } |
| 740 | 741 | ||
| 742 | if (strcmp(cmd, "collect_outbox") == 0) { /** **/ | ||
| 743 | enqueue_collect_outbox(&snac, url); | ||
| 744 | return 0; | ||
| 745 | } | ||
| 746 | |||
| 741 | if (strcmp(cmd, "insert") == 0) { /** **/ | 747 | if (strcmp(cmd, "insert") == 0) { /** **/ |
| 742 | int status; | 748 | int status; |
| 743 | xs *data = NULL; | 749 | xs *data = NULL; |