dgd_funcs.c

MudOSa4DGD/mudlib/dgd/lib/sys/kfun/dgd_funcs.c · 1.4 KB

From the archive MudOSa4DGD-30.06.98.tar.gz

Download the archive   « Back to the archive contents

/*
 * dgd_funcs.c
 *
 * DGD kernel functions renamed to dgd_*
 * This is usually done when the original kfuns are overidden,
 * but still needed.
 * Driver security should be set to all "non-harmless" functions here.
 *
 * (C) Frank Schmidt, Jesus@NorseMUD
 *
 */


/* compile a file */
static object dgd_compile_object(string file) {
  if (DRIVER_PRIV())
    return ::compile_object(file);
  else
    illegal();
}


/* do handle based call_out handling */
static varargs int dgd_call_out(string func, int delay, mixed args...) {
  if (DRIVER_PRIV())
    return ::call_out(func, delay, args...);
  else
    illegal();
}


/* remove call_out by handle */
static int dgd_remove_call_out(int handle) {
  if (DRIVER_PRIV())
    return ::remove_call_out(handle);
  else
    illegal();
}


/* write to file */
static varargs int dgd_write_file(string file, string str, int offs) {
  if (DRIVER_PRIV())
    return ::write_file(file, str, offs);
  else
    illegal();
}


/* rename file */
static int dgd_rename_file(string from, string to) {
  if (DRIVER_PRIV())
    return ::rename_file(from, to);
  else
    illegal();
}


/* remove file */
static int dgd_remove_file(string file) {
  if (DRIVER_PRIV())
    return ::remove_file(file);
  else
    illegal();
}


#if 0

/* get users list over user objects */
static object *dgd_users() {
  if (DRIVER_PRIV())
    return ::users();
  else
    illegal();
}

#endif

Site Stats

Snippets: 1791
Codebases: 571