creator_file.c

MudOSa4DGD/mudlib/dgd/sfun/creator_file.c · 452 B

From the archive MudOSa4DGD-30.06.98.tar.gz

Download the archive   « Back to the archive contents

/*
 * creator_file.c
 *
 * SFUN: Find the creator of a file (not uid like in master)
 *
 * (C) Frank Schmidt, Jesus@NorseMUD
 *
 */

static string creator_file(string str) {
  string dom, wiz, residue;
  
  if (!str || !strlen(str)) return 0;
  if (str[0] != '/')
    str = "/" + str;

  if (sscanf(str, DOMAIN_DIR+"%s/%*s", dom, residue) == 2)
    return dom;

  if (sscanf(str, PLAYER_DIR+"%s/%*s", wiz, residue) == 2)
    return wiz;

  return 0;
}

Site Stats

Snippets: 1791
Codebases: 571