finger.c

nightmare3_fluffos_v2/lib/www/gateways/finger.c · 753 B

From the archive nightmare3_fluffos_v2.zip

Download the archive   « Back to the archive contents

/*    /www/gateways/finger.c
 *    from Nightmare IV
 *    handles dynamic World Wide Web data
 *    created by Descartes of Borg 940523
 */

#include <std.h>
#include <daemons.h>

inherit DAEMON;

string gateway(string args) {
    string *tmp;
    string str;

    str = sprintf("<TITLE>%s Finger Gateway</TITLE>", mud_name());
    if(args == "" || !args) args = 0;
    else if(!user_exists(lower_case(args)))
      return sprintf("%s<h1>%s not found.</h1>No such member of the %s"
        " reality.", str, capitalize(args), mud_name());
    tmp = explode((string)FINGER_D->user_finger_display(args), "\n");
    str = sprintf("%s<h1>%s</h1><PLAINTEXT>\n%s</PLAINTEXT>",
      str, tmp[0], implode(tmp[1..sizeof(tmp)-1], "\n")+"\n");
    return str;
}

Site Stats

Snippets: 1791
Codebases: 571