setreboot.c

ds2.9a10/lib/secure/cmds/admins/setreboot.c · 629 B

From the archive ds2.9a10.zip

Download the archive   « Back to the archive contents

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

inherit LIB_DAEMON;

int cmd(string str) {
    int x;

    if( !((int)master()->valid_apply(({ "ASSIST" }))) ){
        return 0;
    }

    if(!str || str == "" || !sscanf(str, "%d", x)){
        this_object()->help();
    }
    x = (int)EVENTS_D->SetRebootInterval(x);
    message("info", "Reboot interval set to "+x+" hours.", this_player());
    return 1;
}

void help() {
    message("help", "Syntax: <setreboot [interval]>\n\n"
      "Sets up the interval at which the mud will automatically reboot.  "
      "The interval should be specified in hours.",
      this_player()
    );
}

Site Stats

Snippets: 1791
Codebases: 571