mud/
mud/2.4.5/dgd/include/
mud/2.4.5/dgd/std/
mud/2.4.5/dgd/sys/
mud/2.4.5/doc/
mud/2.4.5/doc/examples/
mud/2.4.5/log/
mud/2.4.5/obj/Go/
mud/2.4.5/players/
mud/2.4.5/players/lars/
mud/2.4.5/room/death/
mud/2.4.5/room/maze1/
mud/2.4.5/room/post_dir/
mud/2.4.5/room/sub/
object next;
string super;
string match, fun, ob_str, type;

link(ob) {
    next = ob;
}

/*
 * The function to call.
 */
set_type(t) {
    type = t;
}

/*
 * The string to match.
 */
set_match(str) {
    match = str;
}

/*
 * The function to call.
 */
set_function(f) {
    fun = f;
}

/*
 * The object to call.
 */
set_object(ob) {	/* NOTE: a string */
    ob_str = ob;
}

test_match(str) {
    string who,str1;

    if(sscanf(str,"%s " + type + " %s\n",who,str1) == 2){
	if (str1 == match)
	    return call_other(ob_str, fun, str);
    } 
    if (next)
	return call_other(next, "test_match", str);
    else
	return 0;
}

remove_match(str) {
    if (str == match) {
	destruct(this_object());
	return next;
    }
    if (next)
	next = call_other(next, "remove_match", str);
    return this_object();
}

collaps()
{
    if(next)
	call_other(next, "collaps");
    destruct(this_object());
}