_echo.c

nightmare3_fluffos_v2/lib/cmds/creator/_echo.c · 702 B

From the archive nightmare3_fluffos_v2.zip

Download the archive   « Back to the archive contents

//      /bin/dev/_echo.c
//      from the Nightmare Mudlib
//      echoes to the player's environment
//      created by ????

#include <std.h>
#include <security.h>

inherit DAEMON;

int cmd_echo(string str) {
    if(!str) {
        notify_fail("Echo what?\n");
        return 0;
    }
    message("environment", str, environment(this_player()));
    seteuid(UID_LOG);
    log_file("shouts", geteuid(previous_object())+" (echo): "+str+"\n");
    seteuid(getuid());
    return 1;
}

void help() {
    message("help",
      "Syntax: <echo [message]>\n\n"
      "Echoes the message to everyone in your environment.  Do not abuse "
      "this power or you will have to deal with law.", this_player());
}

Site Stats

Snippets: 1791
Codebases: 571