mo_re.c

skylib_fluffos_v3/mudlib/cmds/creator/mo_re.c · 498 B

From the archive skylib_fluffos_v3.zip

Download the archive   « Back to the archive contents

/* more command, trial out by Turrican for a commands daemon. */

#include <creator.h>

inherit COMMAND_BASE;

mixed cmd(string str) {
  object *things;

  seteuid(geteuid(this_player()));

  if(!str) {
    notify_fail("More which file(s)/object?\n");
    return 0;
  }
  if(sizeof(things = WIZ_PRESENT->wiz_present(str, this_player()))) {
    str = file_name(things[0]);
    sscanf(str, "%s#%*d", str);
    if (file_size(str) <= 0)
      str += ".c";
  }
  return this_player()->more_file(str);
}

Site Stats

Snippets: 1791
Codebases: 571