nextreboot.c

foundation2_fluffos_v1/lib/cmds/player/nextreboot.c · 730 B

From the archive foundation2_fluffos_v1.zip

Download the archive   « Back to the archive contents

/*    /cmd *    from the Nightmare Mudlib 3.2
 *    Shows when the next reboot occurs
 *    created by Descartes of Borg 940130
 */

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

inherit LIB_DAEMON;

int cmd(string str) {
    int x;

    x = (int)EVENTS_D->query_next_reboot() - time();
    if(!(str = (string)this_player()->GetEnvVar("TZONE")))
     str = sprintf("%s PST", ctime(time() + x));
    else str = sprintf("%s %s", ctime((int)TIME_D->query_tzone(str) + x), str);
    message("info", sprintf("The next reboot will occur at %s.", str),
      this_player());
    return 1;
}

void help() {
    message("help", "Syntax: <reboot>\n\n"
      "Tells you when the mud is scheduled for its next reboot.",
      this_player()
    );
}

Site Stats

Snippets: 1791
Codebases: 571