Example #1
0
nomask void disable_player(string type)
{
	if( geteuid(previous_object())!=ROOT_UID
	&&	previous_object()!=this_object()) return;

	set("disable_type", type);
	set_temp("disabled", 1);
	disable_commands();
	enable_commands();  // enable command again so this object would be
                            // marked living again. block command in alias.c
                            // instead of here.
}
Example #2
0
void do_tests() {
    object tp;
#ifndef __NO_ADD_ACTION__
    SAVETP;
    enable_commands();
    RESTORETP;
    ASSERT(!find_living("foo"));
    set_living_name("foo");
    ASSERT(find_living("foo") == this_object());
    disable_commands();
    ASSERT(!find_living("foo"));
    enable_commands();
    RESTORETP;
    set_living_name("bar");
    ASSERT(!find_living("foo"));
    ASSERT(find_living("bar") == this_object());
    destruct(this_object());
#endif
}
Example #3
0
void do_tests() {
#ifndef __NO_ADD_ACTION__
    object tp;
    object o1, o2;

    if (this_player()) {
    ASSERT(!find_player("bar"));
    SAVETP;
    enable_commands();
    set_living_name("bar");
    o1 = find_player("bar");
    exec(this_object(), tp);
    o2 = find_player("bar");
    exec(tp, this_object());
    disable_commands();
    RESTORETP;
    ASSERT(!o1);
    ASSERT(o2 == this_object());
    }
#endif
}