summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9ea17b2..2a62816 100644
--- a/main.c
+++ b/main.c
@@ -18,6 +18,7 @@ int main(int argc, char *argv[])
{
char *cmd;
char *basedir;
+ char *user;
int argi = 1;
argc--;
@@ -45,6 +46,27 @@ int main(int argc, char *argv[])
return 0;
}
+ if (argc < argi)
+ return usage();
+
+ user = argv[argi++];
+
+ if (strcmp(cmd, "webfinger") == 0) {
+ xs *actor = NULL;
+ xs *uid = NULL;
+ int status;
+
+ webfinger_request(user, &status, &actor, &uid);
+
+ printf("status: %d\n", status);
+ if (actor != NULL)
+ printf("actor: %s\n", actor);
+ if (uid != NULL)
+ printf("uid: %s\n", uid);
+
+ return 0;
+ }
+
return 0;
}