monitor.c

ds3.0/lib/secure/cmds/creators/monitor.c · 637 B

From the archive ds3.0.zip

Download the archive   « Back to the archive contents

#include <lib.h>
#include <daemons.h>

inherit LIB_DAEMON;

int cmd(string str) {
    object ob;

    if( !str || str == "" ) {
        write("Monitor whom?\n");
    }
    else if(!user_exists(str))
        write(str+": no such player.\n");
    else{
        SNOOP_D->AddMonitor(this_player()->GetKeyName(), str);
        write("The snoop daemon has received your request.");
    }
    return 1;
}

string GetHelp(){
    return "Syntax: monitor <user>\n\n"
        "Logs to a file everything <user> sees or types. "
        "To stop monitoring, an admin must type \"unmonitor <user>\"\n"
        "See also: unmonitor, snoop, unsnoop";
}

Site Stats

Snippets: 1791
Codebases: 571