X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=examples%2Fchat.c;h=4e6f5d6a08518540f6bc2a81835c90c25760bf18;hb=7a9d30b60af9d5e71f1bfee4dd976d5807402a15;hp=88fe127a1df25368512078c89868a0dddc2336c6;hpb=b37cd7198f18ec5e98e2010e72b0407c49069ce7;p=meshlink-tiny diff --git a/examples/chat.c b/examples/chat.c index 88fe127..4e6f5d6 100644 --- a/examples/chat.c +++ b/examples/chat.c @@ -51,24 +51,7 @@ static void parse_command(meshlink_handle_t *mesh, char *buf) { *arg++ = 0; } - if(!strcasecmp(buf, "invite")) { - char *invitation; - - if(!arg) { - fprintf(stderr, "/invite requires an argument!\n"); - return; - } - - invitation = meshlink_invite(mesh, NULL, arg); - - if(!invitation) { - fprintf(stderr, "Could not invite '%s': %s\n", arg, meshlink_strerror(meshlink_errno)); - return; - } - - printf("Invitation for %s: %s\n", arg, invitation); - free(invitation); - } else if(!strcasecmp(buf, "join")) { + if(!strcasecmp(buf, "join")) { if(!arg) { fprintf(stderr, "/join requires an argument!\n"); return; @@ -155,7 +138,6 @@ static void parse_command(meshlink_handle_t *mesh, char *buf) { printf( ": Send a message to the given node.\n" " Subsequent messages don't need the : prefix.\n" - "/invite Create an invitation for a new node.\n" "/join Join an existing mesh using an invitation.\n" "/kick Blacklist the given node.\n" "/who [] List all nodes or show information about the given node.\n"