diff options
author | default <nobody@localhost> | 2023-10-22 09:00:37 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-10-22 09:00:37 +0200 |
commit | 0d78deef42cd1e5d461d98d2acefd4266d323046 (patch) | |
tree | a6187aa52656349b707fa48f266d040361ab65cb /main.c | |
parent | 575a152305f8767ccc0797aee3ddb3d8bcae5756 (diff) |
New function deluser(), to delete a user.
Only unfollows by now.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -19,6 +19,7 @@ int usage(void) printf("init [{basedir}] Initializes the data storage\n"); printf("upgrade {basedir} Upgrade to a new version\n"); printf("adduser {basedir} [{uid}] Adds a new user\n"); + printf("deluser {basedir} {uid} Deletes a user\n"); printf("httpd {basedir} Starts the HTTPD daemon\n"); printf("purge {basedir} Purges old data\n"); printf("webfinger {basedir} {actor} Queries about an actor (@user@host or actor url)\n"); @@ -169,7 +170,7 @@ int main(int argc, char *argv[]) } if (!user_open(&snac, user)) { - printf("error in user '%s'\n", user); + printf("invalid user '%s'\n", user); return 1; } @@ -179,6 +180,10 @@ int main(int argc, char *argv[]) return resetpwd(&snac); } + if (strcmp(cmd, "deluser") == 0) { /** **/ + return deluser(&snac); + } + if (strcmp(cmd, "queue") == 0) { /** **/ process_user_queue(&snac); return 0; |