diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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; } |