summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-10-22 09:00:37 +0200
committerdefault <nobody@localhost>2023-10-22 09:00:37 +0200
commit0d78deef42cd1e5d461d98d2acefd4266d323046 (patch)
treea6187aa52656349b707fa48f266d040361ab65cb /main.c
parent575a152305f8767ccc0797aee3ddb3d8bcae5756 (diff)
New function deluser(), to delete a user.
Only unfollows by now.
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index bce8198..003ad34 100644
--- a/main.c
+++ b/main.c
@@ -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;