iman.c

./lib/secure/udp_cmd_/iman.c · 575 B

From the archive h7v3.0a.tar.gz

Download the archive   « Back to the archive contents

/** Intermud Man ..... Vladimar@Sandsoftime Dec 1993 */
#include <udp.h>
#define INETD "secure/inetd"

status iman (string str) {
    string topic, mud;
    if (!str || sscanf (str, "%s@%s", topic, mud) !=2) {
	notify_fail ("Usage: iman <topic>@<mud>\n");
	return 0;
    }
    if (INETD->send_udp(mud, ([
	  REQUEST : "man",
	 SENDER   : (string)this_player()->query_name(1),
	  DATA     : topic,
	]), 1))
	write ("Message transmitted.\n");
    return 1;
}

void help() {
    write ("Usage : iman <topic>@<mud>\n"+
      "Send a request for a man page to another mud.\n");
}

Site Stats

Snippets: 1791
Codebases: 571