]> git.meshlink.io Git - meshlink-tiny/blobdiff - examples/chatpp.cc
Remove support for meshlink_invite().
[meshlink-tiny] / examples / chatpp.cc
index 294ca866f602fb692eb6e37c39b8c817a07fd950..2fa65d0a9dd4360b32ab2336a9b675580c3594f3 100644 (file)
@@ -41,24 +41,7 @@ static void parse_command(meshlink::mesh *mesh, char *buf) {
                *arg++ = 0;
        }
 
-       if(!strcasecmp(buf, "invite")) {
-               char *invitation;
-
-               if(!arg) {
-                       fprintf(stderr, "/invite requires an argument!\n");
-                       return;
-               }
-
-               invitation = mesh->invite(NULL, arg);
-
-               if(!invitation) {
-                       fprintf(stderr, "Could not invite '%s': %s\n", arg, meshlink::strerror());
-                       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;
@@ -123,7 +106,6 @@ static void parse_command(meshlink::mesh *mesh, char *buf) {
                printf(
                        "<name>: <message>     Send a message to the given node.\n"
                        "                      Subsequent messages don't need the <name>: prefix.\n"
-                       "/invite <name>        Create an invitation for a new node.\n"
                        "/join <invitation>    Join an existing mesh using an invitation.\n"
                        "/kick <name>          Blacklist the given node.\n"
                        "/who [<name>]         List all nodes or show information about the given node.\n"