dest.c

MudOS_0.9.18/mudlib/lil/command/dest.c · 388 B

From the archive MudOS_0.9.18.tar.gz

Download the archive   « Back to the archive contents

#include <command.h>

int
main(string arg)
{
	object obj;

	if (!arg) {
		notify_fail("usage: dest object\n");
		return 0;
	}
	obj = find_object(arg);
	if (!obj) {
		obj = present(arg);
		if (!obj) {
			obj = present(arg, environment(previous_object()));
		}
	}
	if (!obj) {
		notify_fail("can't find that.\n");
		return 0;
	}
	obj->remove();
	if (obj) {
		destruct(obj);
	}
	return 1;
}

Site Stats

Snippets: 1791
Codebases: 571