{"TABLE", fun_table, 1, 5, FN_REG},
{"TEL", fun_tel, 2, 4, FN_REG},
{"TERMINFO", fun_terminfo, 1, 1, FN_REG},
+ {"TESTLOCK", fun_testlock, 2, 2, FN_REG},
{"TEXTENTRIES", fun_textentries, 2, 3, FN_REG},
{"TEXTFILE", fun_textfile, 2, 2, FN_REG},
{"TIME", fun_time, 0, 1, FN_REG},
static int lattr_helper(dbref player, dbref thing, dbref parent, char const *pattern,
ATTR *atr, void *args);
-static dbref
-dbwalk(char *buff, char **bp, dbref executor, dbref enactor,
- int type, dbref loc, dbref after, int skipdark,
- int start, int count, int *retcount);
+static dbref dbwalk(char *buff, char **bp, dbref executor, dbref enactor,
+ int type, dbref loc, dbref after, int skipdark,
+ int start, int count, int *retcount);
const char *
do_get_attrib(dbref executor, dbref thing, const char *attrib)
safe_str("#-1", buff, bp);
return;
}
+/* ARGSUSED */
+FUNCTION(fun_testlock)
+{
+ dbref victim = match_thing(executor, args[1]);
+ boolexp elock = TRUE_BOOLEXP;
+
+ elock = parse_boolexp(executor, args[0], "Search");
+
+ if (!GoodObject(victim)) {
+ safe_str("#-1", buff, bp);
+ return;
+ }
+ if (Can_Locate(executor, victim)) {
+ safe_boolean(eval_boolexp(victim, elock, executor, NULL), buff, bp);
+ } else {
+ safe_str("#-1", buff, bp);
+ }
+ free_boolexp(elock);
+ return;
+}
/* ARGSUSED */
FUNCTION(fun_findable)