+ } else if(!strcasecmp(buf, "whitelist")) {
+ if(!arg) {
+ fprintf(stderr, "/whitelist requires an argument!\n");
+ return;
+ }
+
+ meshlink_node_t *node = meshlink_get_node(mesh[nodeindex], arg);
+
+ if(!node) {
+ fprintf(stderr, "Error looking up '%s': %s\n", arg, meshlink_strerror(meshlink_errno));
+ return;
+ }
+
+ if(!meshlink_whitelist(mesh[nodeindex], node)) {
+ fprintf(stderr, "Error whitelising '%s': %s", arg, meshlink_strerror(meshlink_errno));
+ return;
+ }
+
+ printf("Node '%s' whitelisted.\n", arg);