Method code for $message_frob.eval_ctext()

[Turn on line numbering]
arg this, vars;
var key, new, temp, t, list, vars, okey, keys;

new = .new();
vars = vars.add('this, sender());
if (dict_contains(this, "general"))
    vars = vars.add("$general", "general");
if (vars['varkeys]) {
    for temp in (vars['varkeys]) {
        okey = temp[2];
        key = temp[1] + "." + (| vars[temp[2]].objname() |);
        if (dict_contains(this, key)) {
            this = dict_add(this, temp[1], this[key]);
            this = dict_del(this, key);
        }
    }
    for key in (dict_keys(this)) {
        okey = "$" + key;
        if (dict_contains(vars, okey) || dict_contains(vars, key)) {
            temp = this[key].set_var('this, vars['this]).eval_ctext();
            new = new.add_entry((| vars[okey] |) || vars[key], temp);
        }
    }
} else {
    for key in (dict_keys(this)) {
        temp = this[key].set_var('this, vars['this]).eval_ctext();
        new = new.add_entry((| vars["$" + key] |) || vars[key], temp);
    }
}
return new;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon