patch

./upgradedb-3.0.1998-10-20/files/patch · 353.3 KB

From the archive upgradedb-3.0.1998-10-20.tar.gz

Download the archive   « Back to the archive contents

new obj
Inserting changelog.cdc...

new object $changelog: $file;

var $root manager = $changelog;
var $root managed = [$changelog];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 906983169;
var $dmi_data descriptions = #[];
var $root inited = 1;

public method .log() {
    arg entry;
    
    if (!($changelog_group.includes(caller())))
        (> .perms(sender()) <);
    
    // just silently die if logs/ isn't there
    catch any {
        .fopen("logs/changelog", ">>");
        .fwrite((("[" + time()) + "] ") + entry);
        .fclose();
    }
};


new obj
Inserting mail_list_tracebacks.cdc...

new object $mail_list_tracebacks: $mail_list;

var $root manager = $mail_list_tracebacks;
var $root managed = [$mail_list_tracebacks];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904830832;
var $dmi_data descriptions = #[];
var $has_name name = ['prop, "tracebacks", "tracebacks"];
var $mail_list mail = [];
var $mail_list senders = [$no_one];
var $mail_list readers = 0;
var $mail_list notify = [];
var $root inited = 1;
var $mail_list last_received_on = 0;


new obj
Inserting character.cdc...

new object $character: $thing;

var $root manager = $character;
var $root managed = [$character];
var $root flags = ['variables, 'methods, 'code, 'core, 'fertile];
var $root created_on = 890933084;
var $dmi_data descriptions = #[];
var $has_commands shortcuts = #[];
var $has_commands remote = #[];
var $has_commands local = #[];
var $has_name name = ['prop, "Generic Character", "Generic Character"];
var $described prose = [];
var $located location = $lost_and_found;
var $located obvious = 1;
var $thing gender = $gender_neuter;
var $root inited = 1;
var $character dead = 0;
var $character identity = 0;
var $character affiliation = 0;
var $character deaths = 0;
var $character str = 0;
var $character agl = 0;
var $character app = 0;
var $character itg = 0;
var $character int = 0;
var $character per = 0;
var $character cha = 0;
var $character wil = 0;
var $character cra = 0;
var $character awr = 0;
var $character dmg = 0;
var $character rea = 0;
var $character cmb = 0;
var $character npc = 0;
var $character lrn = 0;
var $character end = 0;
var $character lif = 0;
var $character hum = 0;
var $character kno = 0;
var $character src = 0;
var $character csrc = 0;

public method .fmta() {
    arg stat;
    var base, cur;
    
    [base, cur] = get_var(stat) || [10, 10];
    if (base == cur)
        return pad(tostr(cur), -2) + "    ";
    return strfmt("%2r/%2l", cur, base) + " ";
};

public method .fmts() {
    arg score;
    var v;
    
    v = get_var(score);
    switch (score) {
        case 'hum:
            if (v > 0)
                return pad("+" + v, 6);
    }
    return pad(tostr(v), 6);
};

public method .format_sheet() {
    var out, line;
    
    line = (("  Strength: " + (.fmta('str))) + " Intellect: ") + (.fmta('int));
    line += (("    Craft: " + (.fmta('cra))) + " STR DMG: ") + (.fmts('dmg));
    out = [line];
    line = (("   Agility: " + (.fmta('agl))) + "Perception: ") + (.fmta('per));
    line += (("Awareness: " + (.fmta('awr))) + " CMB REA: ") + (.fmts('cmb));
    out += [line];
    line = (("Appearance: " + (.fmta('app))) + "  Charisma: ") + (.fmta('cha));
    line += "   -------        NPC REA: " + (.fmts('npc));
    out += [line];
    line = ((" Integrity: " + (.fmta('itg))) + " Willpower: ") + (.fmta('wil));
    line += ((" Humanity: " + (.fmta('hum))) + "   Learn: ") + (.fmts('lrn));
    out += [line, ""];
    line = ((((((" Endurance: " + (.fmts('end))) + " Knowledge: ") + (.fmts('kno))) + "   Source: ") + (.fmts('src))) + " Cur Src: ") + (.fmts('csrc));
    out += [line];
    line = ("   ** Life: " + (.fmts('lif))) + "    DAMAGE: x/x    CRITICAL: x/x     HEALTH: x/x";
    return out + [line];
};

public method .lower_attr() {
    arg attribute, difference;
    var new;
    
    new = (get_var(attribute)[1]) - difference;
    set_var(attribute, get_var(attribute).replace(1, new));
};

public method .raise_attr() {
    arg attribute, difference;
    var new;
    
    new = (get_var(attribute)[1]) + difference;
    if (new > (get_var(attribute)[2]))
        new = get_var(attribute)[2];
    set_var(attribute, get_var(attribute).replace(1, new));
};

public method .attribute() {
    arg attribute;
    
    if (caller() != definer())
        (> .perms(sender(), 'trusts) <);
    if (!(attribute in (.attributes())))
        throw(~invattr, "Invalid Attribute: " + attribute);
    return get_var(attribute) || [10, 10];
};

public method .dead() {
    return dead;
};

public method .ok_to_raise_initial() {
    arg attr, amt;
    var a, tot, phys, ment, meta, list, i, end;
    
    phys = .physical_attributes();
    ment = .mental_attributes();
    meta = .meta_attributes();
    for a in ((phys + ment) + meta) {
        if ((a = get_var(a)))
            tot += a[1];
        else
            tot += 10;
    }
    if (tot > 110)
        return "No initial points left, try reducing another attribute.";
    end = ((get_var(attr) || [10])[1]) + amt;
    if (end > 16)
        return "Initial Attributes may not be more than 16";
    if (attr in phys) {
        list = phys;
        i = [56, "Physical"];
    } else if (attr in ment) {
        list = ment;
        i = [56, "Mental"];
    } else if (attr in meta) {
        list = meta;
        i = [30, "Meta-Physical"];
    } else {
        throw(~invattr, "Invalid Attribute: " + attr);
    }
    tot = 0;
    for a in (list) {
        if ((a = get_var(a)))
            tot += a[1];
        else
            tot += 10;
    }
    if ((tot + amt) > (i[1]))
        return ((("This would go beyond the max (" + (i[1])) + ") for ") + (i[2])) + " Attributes";
    return end;
};

public method .init_character() {
    str = (agl = (app = (itg = (int = (per = (cha = (wil = (cra = (awr = [10, 10])))))))));
};

public method .ok_to_lower_initial() {
    arg attr, amt;
    var end;
    
    end = ((get_var(attr) || [10])[1]) - amt;
    if (end < 6)
        return "Initial Attributes may not be less than 6";
    return end;
};

public method .meta_attributes() {
    return ['cra, 'awr];
};

public method .physical_attributes() {
    return ['str, 'agl, 'app, 'itg];
};

public method .mental_attributes() {
    return ['int, 'per, 'cha, 'wil];
};

public method .attributes() {
    return ((.physical_attributes()) + (.mental_attributes())) + (.meta_attributes());
};

public method .set_attribute() {
    arg attribute, base;
    var cur;
    
    (> .perms(caller(), $player) <);
    if (!(attribute in (.attributes())))
        throw(~invattr, "Invalid Attribute: " + attribute);
    cur = get_var(attribute) || [10, 10];
    cur = replace(cur, 1, base);
    if ((cur[2]) > base)
        cur = replace(cur, 2, base);
    set_var(attribute, cur);
};


new obj
Inserting introtut_path1.cdc...

new object $introtut_path1: $path;

var $root manager = $introtut_path1;
var $path ways = #[[$introtut_moving, $introtut_moving_1], [$introtut_moving_1, $introtut_moving]];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 882834737;
var $dmi_data descriptions = #[];
var $has_commands shortcuts = #[];
var $has_commands remote = #[];
var $has_commands local = #[];
var $has_name name = ['prop, "path_140", "path_140"];
var $described prose = [];
var $path names = #[[$introtut_moving, ['prop, "east", "", []]], [$introtut_moving_1, ['prop, "west", "", []]]];
var $root inited = 1;
var $root managed = [$introtut_path1];


new obj
Inserting introtut_path2.cdc...

new object $introtut_path2: $path;

var $root manager = $introtut_path2;
var $path ways = #[[$introtut_moving_1, $introtut_moving_2], [$introtut_moving_2, $introtut_moving_1]];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 882834737;
var $dmi_data descriptions = #[];
var $has_commands shortcuts = #[];
var $has_commands remote = #[];
var $has_commands local = #[];
var $has_name name = ['prop, "path_142", "path_142"];
var $described prose = [];
var $path names = #[[$introtut_moving_1, ['prop, "stairs", "", ["d?own"]]], [$introtut_moving_2, ['prop, "stairs", "", ["u?p"]]]];
var $root inited = 1;
var $root managed = [$introtut_path2];


new obj
Inserting help_obj_motd.cdc...

new object $help_obj_motd: $help_obj;

var $root manager = $help_obj_motd;
var $root managed = [$help_obj_motd];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 906679568;
var $dmi_data descriptions = #[];
var $has_name name = ['prop, "motd", "motd"];
var $help_node links = #[];
var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "$motd is an object which controls the display which users receive upon connecting, as well as the web page which the HTTP server returns. This object allows administrators to easily change and customize this information. This can be done via the following settings:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], ["$motd:login-sequence:"], 'do_dt]>, <$format, ["dd", [], ["Sets the sequence of items to be displayed on the login screen"], 'do_dd]>, <$format, ["dt", [], ["$motd:server-name:"], 'do_dt]>, <$format, ["dd", [], ["Sets the default server name for MOTD displays"], 'do_dd]>, <$format, ["dt", [], ["$motd:server-title:"], 'do_dt]>, <$format, ["dd", [], ["Sets the default server title for MOTD displays"], 'do_dd]>], 'do_dl]>, <$format, ["p", [], [], 'do_p]>, "$motd:login-sequence is a list of items which can be passed to $motd.build() to construct the login display. The list of valid arguments are as follows:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], ["'admins:"], 'do_dt]>, <$format, ["dd", [], ["Displays a list of administrators"], 'do_dd]>, <$format, ["dt", [], ["'connected:"], 'do_dt]>, <$format, ["dd", [], ["Displays the number of currently connected users"], 'do_dd]>, <$format, ["dt", [], ["'core_version:"], 'do_dt]>, <$format, ["dd", [], ["Displays the current core version"], 'do_dd]>, <$format, ["dt", [], ["'default:"], 'do_dt]>, <$format, ["dd", [], ["Constructs a default login display"], 'do_dd]>, <$format, ["dt", [], ["'driver_version:"], 'do_dt]>, <$format, ["dd", [], ["Displays the version of the driver currently in use"], 'do_dd]>, <$format, ["dt", [], ["'help:"], 'do_dt]>, <$format, ["dd", [], ["Displays a help message"], 'do_dd]>, <$format, ["dt", [], ["'long:"], 'do_dt]>, <$format, ["dd", [], ["Displays the server's title, then its name"], 'do_dd]>, <$format, ["dt", [], ["'name:"], 'do_dt]>, <$format, ["dd", [], ["Displays the server name"], 'do_dd]>, <$format, ["dt", [], ["'notes:"], 'do_dt]>, <$format, ["dd", [], ["Displays the contents of the notes variable on $motd"], 'do_dd]>, <$format, ["dt", [], ["'short:"], 'do_dt]>, <$format, ["dd", [], ["Displays only the server's title"], 'do_dd]>, <$format, ["dt", [], ["'title:"], 'do_dt]>, <$format, ["dd", [], ["Displays the server title"], 'do_dd]>, <$format, ["dt", [], ["'quote:"], 'do_dt]>, <$format, ["dd", [], ["Displays a random quote"], 'do_dd]>], 'do_dl]>], #[]]>;
var $root inited = 1;
var $help_node index = $help_index_objects;


new obj
Inserting chargen_parser.cdc...

new object $chargen_parser: $user_parsers;

var $root manager = $chargen_parser;
var $user_parsers priority = 700;
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 863732681;
var $dmi_data descriptions = #[];
var $root inited = 1;
var $root managed = [$chargen_parser];

public method .parse() {
    arg user, str, next_parser, @other_parsers;
    var m, cmd, args;
    
    str = str.trim();
    
    // direct drop-through
    if (str && ((str[1]) == ">"))
        return next_parser.parse(user, substr(str, 2), @other_parsers);
    
    // shortcut?
    if ((m = regexp(str, "^(\+|-)([0-9a-z]+) *(.*)$"))) {
        if ((m[1]) == "-")
            str = (("lower " + (m[3])) + " ") + (m[2]);
        else
            str = (("raise " + (m[3])) + " ") + (m[2]);
    }
    cmd = explode(str);
    if (cmd && ((cmd[1]) in ["help", "lower", "raise", "sheet", "done", "abort"])) {
        args = sublist(cmd, 2);
        cmd = lowercase(cmd[1]);
        return ['command, user, tosym(cmd + "_charcmd")] + args;
    }
    return next_parser.parse(user, str, @other_parsers);
};


new obj
Inserting group.cdc...

new object $group: $root;

var $root manager = $group;
var $root managed = [$group];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904653573;
var $root inited = 1;
var $root defined_settings = #[["group", #[['get, ['get_group]], ['set, ['set_group]], ['parse, ['parse_group]], ['format, ['format_group]]]]];
var $group group = #[];

public method .get_group() {
    arg @args;
    
    return group;
};

protected method .set_group() {
    arg name, definer, value;
    
    if (this() == definer())
        throw(~invgroup, "You cannot change the base group " + definer());
    switch (value[1]) {
        case 'set:
            group = value[2];
        case 'add:
            group = dict_add(group, value[2], 1);
        case 'del:
            group = dict_del(group, value[2]);
        default:
            throw(~type, "Unknown action: " + (value[1]));
    }
};

public method .del_from_group() {
    arg target;
    
    (> .perms(sender()) <);
    group = dict_del(group, target);
};

root method .init_group() {
    group = #[];
};

public method .includes() {
    arg target;
    
    if (!dict_contains(group, target)) {
        if (this() == definer())
            return 0;
    
        //   if (this() == definer())
        //       return $sys.is_system(target);
        return (parents()[1]).includes(target);
    }
    return 1;
};

public method .add_to_group() {
    arg target;
    
    (> .perms(sender()) <);
    group = dict_add(group, target, 1);
};

root method .uninit_group() {
    if (sender() != definer())
        clear_var('group);
    else
        group = #[];
};

public method .parse_group() {
    arg value, @args;
    var action, list, item, out;
    
    if (value && ((value[1]) in ["+", "-"])) {
        if ((value[1]) == "-")
            action = 'del;
        else
            action = 'add;
        list = [substr(value, 2)];
    } else {
        action = 'set;
        list = value.explode_english_list();
    }
    out = hash item in (list) to ([(> $object_lib.to_dbref(item) <), 1]);
    if (action == 'set)
        return [action, out];
    else
        return [action, dict_keys(out)[1]];
};

public method .format_group() {
    arg data;
    
    return join(dict_keys(data), ", ");
};

public method .parse_grouplist() {
    arg value, method, @args;
    var action, list, item, out;
    
    if (value && ((value[1]) in ["+", "-"])) {
        if ((value[1]) == "-")
            action = 'del;
        else
            action = 'add;
        list = [substr(value, 2)];
    } else {
        action = 'set;
        list = value.explode_english_list();
    }
    out = #[];
    for item in (list) {
        if (method) {
            catch ~methodnf
                item = (> sender().(method)(item, action, @args) <);
            with
                item = (> .(method)(item, action, @args) <);
        }
        out = dict_add(out, item, 1);
    }
    if (action == 'set)
        return [action, out];
    else
        return [action, out[1]];
};

public method .is_group() {
    return 1;
};


new obj
Inserting core_group.cdc...

new object $core_group: $group;

var $root manager = $core_group;
var $root managed = [$core_group];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904657222;
var $root inited = 1;
var $group group = #[];


new obj
Inserting create_for_others_group.cdc...

new object $create_for_others_group: $core_group;

var $root manager = $create_for_others_group;
var $root managed = [$create_for_others_group];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904657034;
var $root inited = 1;
var $group group = #[];


new obj
Inserting create_for_sender_group.cdc...

new object $create_for_sender_group: $create_for_others_group;

var $root manager = $create_for_sender_group;
var $root managed = [$create_for_sender_group];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904657041;
var $root inited = 1;
var $group group = #[];


new obj
Inserting syslog_group.cdc...

new object $syslog_group: $core_group;

var $root manager = $syslog_group;
var $root managed = [$syslog_group];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904656992;
var $root inited = 1;
var $group group = #[[$daemon, 1], [$connection, 1], [$dns, 1], [$guest, 1], [$user, 1], [$body, 1], [$sys, 1], [$root, 1], [$login_interface, 1], [$http_interface, 1], [$connection_interface, 1]];


new obj
Inserting changelog_group.cdc...

new object $changelog_group: $core_group;

var $root manager = $changelog_group;
var $root managed = [$changelog_group];
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 906983574;
var $group group = #[[$root, 1]];
var $root inited = 1;


new obj
Inserting staff_group.cdc...

new object $staff_group: $group;

var $root manager = $staff_group;
var $root flags = ['variables, 'methods, 'code, 'core];
var $root created_on = 904657230;
var $root inited = 1;
var $root managed = [$staff_group];
var $group group = #[];


new obj
Inserting building_group.cdc...

new object $building_group: $staff_group;

var $root manager = $building_group;
var $root flags = ['variables, 'methods, 'code, 'fertile, 'core];
var $root created_on = 904655977;
var $group group = #[];
var $root inited = 1;
var $root managed = [$building_group];


new obj
Inserting programming_group.cdc...

new object $programming_group: $staff_group;

var $root manager = $programming_group;
var $root managed = [$programming_group];
var $root flags = ['variables, 'methods, 'code, 'fertile, 'core];
var $root created_on = 904657855;
var $root inited = 1;
var $group group = #[];


new obj
Inserting conditional_group.cdc...

new object $conditional_group: $group;

var $root manager = $conditional_group;
var $root flags = ['variables, 'methods, 'code, 'fertile, 'core];
var $root created_on = 904657262;
var $root inited = 1;
var $root managed = [$conditional_group];
var $group group = #[];

public method .includes() {
    arg target;
    
    if (!((.get_group()).try(target))) {
        if (this() == definer())
            return $sys.is_system(target);
        return (parents()[1]).includes(target);
    }
    return 1;
};

protected method .set_group() {
    arg name, definer, value;
    var list;
    
    // just ignore any itemlist stuff
    value = value[2];
    if ((type(value) != 'frob) || (!(frob_class(value).is($logic_frob))))
        throw(~invlogic, "Conditional groups must be set as $logic_frobs");
    pass(name, definer, ['set, value]);
};

public method .del_from_group() {
    arg target;
    
    // do something, quick... perhaps throw an error 
    throw(~invlogic, "You can only set conditional groups with @set group:group=...");
};

public method .add_to_group() {
    arg target;
    
    // do something, quick... perhaps throw an error
    throw(~invlogic, "You can only set conditional groups with @set group:group=...");
};

root method .init_conditional_group() {
    .set_group(0, 0, ['set, $false_lock_frob.new()]);
};

public method .parse_group() {
    arg value, @args;
    
    if (value in ["none", "nobody"])
        value = "no";
    else if (value in ["anybody", "everybody"])
        value = "yes";
    return ['set, (> $lock_frob.parse(value, user() || this()) <)];
};

root method .format_group() {
    arg value;
    var unparse;
    
    unparse = value.unparse();
    if (unparse == "yes")
        return "anybody";
    else if (unparse == "no")
        return "nobody";
    return unparse;
};


maintenance

public method $root.__upgrade_handle_var() {
  arg handle, vref, old, current, new;

  if (current != old) {
      // if (handle == 1) {
          if (type(old) != type(current)) {
              dblog("ERROR: datatype inconsistency for " + vref +
                    " " + type(old) + " != " + type(current));
          }
          switch (type(current)) {
              case 'dictionary:
                  return dict_union(new, current);
              case 'list:
                  return union(new, current);
              default:
                  return new;
          }
      // }
  }
  return new;
};
new method
Replacing public method $root.has_ancestor(): nooverride 

public method $root.has_ancestor(): nooverride  {
    arg obj;
    
    return has_ancestor(obj);
};
new method
Replacing public method $root.will_spawn(): nooverride 

public method $root.will_spawn(): nooverride  {
    arg who;
    
    if (!(.has_flag('fertile, who)))
        throw(~perm, (.namef('ref)) + " is not fertile or readable.");
    
    // available quota?
    if (!(who.quota_valid()))
        throw(~quota, "Sender does not have the available quota");
};
new method
Adding public method $root.is_writable_by2(): nooverride 

public method $root.is_writable_by2(): nooverride  {
    arg obj;
    var o;
    
    for o in (.writers()) {
        if (o.has_ancestor($group)) {
            if (o.includes(obj))
                return 1;
        } else if (o == obj) {
            return 1;
        }
    }
    return $sys.is_system(obj);
};
new method
Adding public method $root.is_writable_by3(): nooverride 

public method $root.is_writable_by3(): nooverride  {
    arg obj;
    var o;
    
    for o in (.writers()) {
        if (o.has_ancestor($group)) {
            if (o.includes(obj))
                return 1;
        } else if (o == obj) {
            return 1;
        }
    }
    return $sys.is_system(obj);
};
new method
Replacing public method $root.writers(): nooverride 

public method $root.writers(): nooverride  {
    arg @literal;
    
    if (literal)
        return writers || [];
    if (manager != this())
        return [manager, this()] + (writers || []);
    return [manager] + (writers || []);
};
new method
Replacing public method $root.set_quota_exempt(): nooverride 

public method $root.set_quota_exempt(): nooverride  {
    arg bool;
    
    (> .perms(sender(), $user, @$sys.system(), $root) <);
    if (bool)
        quota_exempt = 1;
    else
        (| clear_var('quota_exempt) |);
};
new method
Replacing public method $root.uninitialize(): nooverride 

public method $root.uninitialize(): nooverride  {
    arg @destroyed;
    var a, v, d, definer, method, descendants, str, tb;
    
    (> .perms(caller(), $root, $sys) <);
    destroyed = destroyed ? 1 : 0;
    descendants = (.descendants()) + [this()];
    
    // call [ancestors...].uninit_ancestor() on the object being destroyed
    for a in (ancestors()) {
        method = tosym("uninit_" + (a.objname()));
        if ((definer = (| find_method(method) |))) {
            if (definer != a) {
                // scream madly and run around--everybody should know this
                str = "UNINIT ERROR: uninit method for " + a;
                str += (" in wrong place (" + definer) + ")";
                (| (definer.manager()).tell(str) |);
                (| (a.manager()).tell(str) |);
                (| sender().tell(str) |);
                continue;
            }
            catch any {
                .(method)();
            } with {
                // try and let somebody know they made a boo-boo somewhere
                tb = traceback().fmt_tb();
                str = ((("UNINIT ERROR " + this()) + "<") + definer) + ">:";
                if (definer) {
                    (| (definer.manager()).tell(str) |);
                    (| (definer.manager()).tell(tb) |);
                }
                (| sender().tell(str) |);
                (| sender().tell(tb) |);
                (| sender().tell("Continuing uninit..") |);
                (| $sys.log_traceback(tb, "** " + str) |);
            }
        }
        refresh();
    }
    
    // if we have descendants, clean anything from the object being dested
    method = tosym("uninit_" + (.objname()));
    if ((definer = (| find_method(method) |))) {
        if (definer != this()) {
            // scream madly and run around--everybody should know this
            str = "UNINIT ERROR: uninit method for " + a;
            str += (" in wrong place (" + definer) + ")";
            (| (definer.manager()).tell(str) |);
            (| (.manager()).tell(str) |);
            (| sender().tell(str) |);
        } else {
            for d in (descendants) {
                catch any {
                    d.(method)();
                } with {
                    // try and let somebody know they made a boo-boo somewhere
                    str = ((("UNINIT ERROR " + d) + "<") + this()) + ">:";
                    tb = traceback().fmt_tb();
                    (| (.manager()).tell(str) |);
                    (| (.manager()).tell(tb) |);
                    if ((.manager()) != sender()) {
                        (| sender().tell(str) |);
                        (| sender().tell(tb) |);
                    }
                    (| sender().tell("Continuing uninit..") |);
                    (| $sys.log_traceback(tb, "** " + str) |);
                }
                refresh();
            }
        }
    }
    
    // clear vars
    if ((!destroyed) && descendants)
        $sys.clear_definer_vars(this(), descendants);
};
new method
Replacing public method $root.credit()

public method $root.credit() {
    var line;
    
    if ('core in (flags || [])) {
        line = "Created ";
        if ((.created_on()) > 0)
            line += ($time.format("%d-%h-%Y", .created_on())) + " ";
        line = [line + "as a part of ColdCore, see: @help Credit"];
    } else {
        line = [];
    }
    if (credit)
        return credit + line;
    return line;
};
new method
Replacing public method $root.del_var(): nooverride 

public method $root.del_var(): nooverride  {
    arg name;
    var n, obj;
    
    (caller() == definer()) || (> .perms(sender()) <);
    (> $sys.touch() <);
    
    // try and clear the variable on all of the descendants, before 
    // deleting the variable...   
    (> .clear_variable(name) <);
    
    // now delete the variable
    (> del_var(name) <);
    if ('core in (.flags()))
        $changelog.log((((("DEL-VAR: " + this()) + ",") + name) + " by ") + sender());
};
new method
Replacing public method $root.add_method()

public method $root.add_method() {
    arg code, name, @evalonly;
    var l, m, line, errs;
    
    (> .perms(sender()) <);
    if (evalonly && (caller() in [$root, $sys, $programmer]))
        (> $sys.touch('lockok) <);
    else
        (> $sys.touch() <);
    
    // check for a few things only admins can do
    if (!(sender().is($admin))) {
        for l in [1 .. listlen(code)] {
            line = code[l];
            if ((m = line.match_regexp("[^a-z0-9_.]anticipate_assignment\("))) {
                (> sender().tell($code_lib.point_to_line("ERROR: call to anticipate_assignment()", ((m[1])[1]) + 2, ((m[1])[2]) - 2, l, line)) <);
                throw(~perm, "anticipate_assignment() may only be used by an administrator.");
            }
        }
    }
    errs = (> add_method(code, name) <);
    if ('core in (.flags()))
        $changelog.log((((("ADD-METHOD: " + this()) + ".") + name) + " by ") + sender());
    for l in [1 .. listlen(errs)] {
        line = errs[l];
        if (match_regexp(line, "Line [0-9]+: Unknown function length.")) {
            line = substr(line, 1, strlen(line) - 1);
            errs = replace(errs, l, line + "(), try listlen(), strlen() or buflen()");
        }
    }
    return errs;
};
new method
Replacing public method $root.add_var(): nooverride 

public method $root.add_var(): nooverride  {
    arg name, @args;
    var tmp, kid;
    
    (> .perms(sender()) <);
    (> $sys.touch() <);
    if (!(tostr(name).valid_ident()))
        throw(~invident, name + " is not a valid ident.");
    (> add_var(name) <);
    if ('core in (.flags()))
        $changelog.log((((("ADD-VAR: " + this()) + ",") + name) + " by ") + sender());
    
    // The following code is a kludge as we can't send a default value  
    // to the primitive.   
    if (args) {
        tmp = tosym((("__set_" + tostr(name)) + "_") + time());
        catch any {
            add_method([((tostr(name) + " = ") + toliteral(args[1])) + ";"], tmp);
            .(tmp)();
            if (((args.length()) > 1) && ((args[2]) == 'inherit)) {
                for kid in (.descendants())
                    kid.(tmp)();
            }
            del_method(tmp);
        } with {
            del_method(tmp);
            rethrow(error());
        }
    }
};
new method
Replacing public method $root.set_flags(): nooverride 

public method $root.set_flags(): nooverride  {
    arg new_flags;
    
    (> .perms(sender(), 'manager) <);
    (> $sys.touch() <);
    if (type(new_flags) != 'list)
        throw(~invflags, "Flags must be submitted as a list of symbols.");
    if ((!new_flags) && flags)
        return clear_var('flags);
    if ((('core in new_flags) && (!('core in (.flags())))) && (!($sys.is_system(sender()))))
        throw(~perm, "Only system objects can set the 'core flag.");
    if (('fertile in new_flags) && (!('fertile in flags)))
        (> .perms(sender(), 'manager) <);
    flags = new_flags;
};
new method
Replacing public method $root.set_setting(): nooverride 

public method $root.set_setting(): nooverride  {
    arg name, definer, value;
    var i, args;
    
    (> .perms(sender()) <);
    i = (> definer.setting_info(name) <);
    if (dict_contains(i, 'parse)) {
        args = sublist(i['parse], 2);
        if ((| find_method((i['parse])[1]) |))
            value = (> .((i['parse])[1])(value, @args) <);
        else
            value = (> $settings.((i['parse])[1])(value, @args) <);
    }
    if (dict_contains(i, 'set))
        (> .((i['set])[1])(name, definer, value, @sublist(i['set], 2)) <);
    else
        settings = dict_add(settings || #[], name, value);
};
new method
Replacing public method $root.initialize(): nooverride 

public method $root.initialize(): nooverride  {
    var ancestors, pos, len, method, a, def, str, tb;
    
    if ((caller() != $sys) && (sender() != this()))
        throw(~perm, "Caller is not $sys and sender is not this.");
    if (inited)
        throw(~perm, "Already initialized.");
    ancestors = ancestors();
    len = ancestors.length();
    for pos in [0 .. len - 1] {
        refresh();
        a = ancestors[len - pos];
        if (!(method = (| tosym("init_" + tostr(a.objname())) |)))
            continue;
        if ((def = (| find_method(method) |))) {
            if (def != a) {
                (| (def.manager()).tell(((("Initialization method for " + a) + " in wrong place (") + find_method(method)) + ")") |);
            } else {
                catch any {
                    .(method)();
                } with {
                    // try and let somebody know they made a boo-boo somewhere
                    str = ((("UNINIT ERROR " + this()) + "<") + def) + ">:";
                    tb = traceback().fmt_tb();
                    if (def) {
                        (| (def.manager()).tell(str) |);
                        (| (def.manager()).tell(tb) |);
                    }
                    if ((.manager()) != sender()) {
                        (| sender().tell(str) |);
                        (| sender().tell(tb) |);
                    }
                    (| sender().tell("Continuing init..") |);
                    (| $sys.log_traceback(tb, "** " + str) |);
                }
            }
        }
    }
    inited = 1;
};
new method
Replacing public method $root.del_method()

public method $root.del_method() {
    arg name;
    
    (> .perms(sender()) <);
    (> del_method(name) <);
    if ('core in (.flags()))
        $changelog.log((((("DEL-METHOD: " + this()) + ",") + name) + " by ") + sender());
};
new method
Replacing public method $root.debug()

public method $root.debug() {
    arg @stuff;
    var x, line, mngr, meth, stack, out, ref;
    
    stack = stack();
    meth = (| (((stack[2])[3]) + "() line ") + ((stack[2])[4]) |);
    if (sender() != caller())
        ref = ((sender() + "<") + caller()) + ">";
    else
        ref = sender();
    if (meth)
        line = ((("DEBUG " + ref) + ".") + meth) + ":";
    else
        line = ("DEBUG " + ref) + ":";
    out = [line];
    for x in (stuff)
        out += ($data_lib.unparse_indent(x)).prefix("DEBUG    ");
    (| (.manager()).tell(out) |);
};
new method
Adding public method $root.write_check(): nooverride 

public method $root.write_check(): nooverride  {
    arg obj;
    
    if (.is($group))
        return .includes(obj);
    else
        return this() == obj;
};
new method
Replacing public method $root.is_writable_by(): nooverride 

public method $root.is_writable_by(): nooverride  {
    arg obj;
    var o;
    
    return (| obj in (.writers()) |) || ($sys.is_system(obj));
    for o in (.writers()) {
        if (o.has_ancestor($group)) {
            if (o.includes(obj))
                return 1;
        } else if (o == obj) {
            return 1;
        }
    }
    return $sys.is_system(obj);
};
new method
Replacing root method $root.change_parents(): nooverride 

root method $root.change_parents(): nooverride  {
    arg parents;
    var old_a, old_p, a, obj, new_a, definer, branch, method, str;
    
    if (!parents)
        throw(~noparents, "Objects must have at least 1 parent");
    
    // remember a few things
    old_a = setremove(ancestors(), this());
    old_p = .parents();
    branch = (.descendants()) + [this()];
    
    // build the new ancestors list by hand, so we can figure out what is
    // changing, and uninitialize those ancestors that are going away
    new_a = [];
    for obj in (parents)
        new_a = new_a.union(obj.ancestors());
    
    // uninit any ancestors going away
    for a in (old_a.set_difference(new_a)) {
        // call this ancestor's uninit on the obj and all its children
        method = tosym("uninit_" + (a.objname()));
        if ((definer = (| find_method(method) |))) {
            if (definer != a) {
                // scream madly and run around--everybody should know this
                str = "UNINIT ERROR: uninit method for " + a;
                str += (" in wrong place (" + definer) + ")";
                (| (definer.manager()).tell(str) |);
                (| (a.manager()).tell(str) |);
                (| sender().tell(str) |);
                continue;
            }
    
            // call the uninit method on this object only
            catch any {
                .(method)();
            } with {
                // try and let somebody know they made a boo-boo somewhere
                str = ((("UNINIT ERROR " + obj) + "<") + this()) + ">:";
                (| (.manager()).tell(str) |);
                (| (.manager()).tell_traceback(traceback()) |);
                (| sender().tell(str) |);
                (| sender().tell_traceback(traceback()) |);
                (| sender().tell("Continuing chparent..") |);
            }
        }
    
        // cleanup any old obj vars left lying around
        // if (branch)
        //     $sys.clear_definer_vars(a, branch);
        $sys.clear_definer_vars(a, [this()]);
        refresh();
    }
    
    // make the change
    (> chparents(parents) <);
    if ('core in (.flags()))
        $changelog.log(((((("CHANGE-PARENTS: " + this()) + " from ") + old_p) + " to ") + parents()) + " by ");
    new_a = setremove(ancestors(), this());
    
    // init anybody new to the family
    for a in (new_a.set_difference(old_a)) {
        method = tosym("init_" + (a.objname()));
        if ((definer = (| find_method(method) |))) {
            if (definer != a) {
                // scream madly and run around--everybody should know this
                // (damn inlaws, can't ever get things right)
                str = "INIT ERROR: uninit method for " + a;
                str += (" in wrong place (" + definer) + ")";
                (| (definer.manager()).tell(str) |);
                (| (a.manager()).tell(str) |);
                (| sender().tell(str) |);
                continue;
            }
    
            // introduce the new ancestor
            catch any {
                .(method)();
            } with {
                // try and let somebody know they made a boo-boo somewhere
                str = ((("INIT ERROR " + obj) + "<") + this()) + ">:";
                (| (.manager()).tell(str) |);
                (| (.manager()).tell_traceback(traceback()) |);
                (| sender().tell(str) |);
                (| sender().tell_traceback(traceback()) |);
                (| sender().tell("Continuing chparent..") |);
            }
        }
        refresh();
    }
};
update objvar
Updating objvar $sys<$sys>,core_version

object $sys;
var $sys core_version = "3.0.1998-10-20";
update objvar
Updating objvar $sys<$sys>,loggers

public method $sys.__upgrade_set_var() {
  var old, new;

  old = [$daemon, $user, $connection, $dns];
  new = [$daemon, $user, $connection, $dns, $guest];
  catch any {
  dblog("__upgrade_handle_var(1, loggers)");
      loggers = .__upgrade_handle_var(1, "$sys<$sys>,loggers", old, loggers, new);
  } with {
      dblog("ERROR: " + traceback()[1][2]);
  }
};

object $sys;

eval {
  .__upgrade_set_var();
};

object $sys;
eval {
  del_method('__upgrade_set_var);
};

// old public method $sys.__upgrade_set_var();
add objvar
Adding objvar $sys<$root>,settings

object $sys;
var $root settings = #[["traceback-for", $builder]];
update objvar
Updating objvar $sys<$root>,defined_settings

public method $root.__upgrade_set_var() {
  var old, new;

  old = #[["loggers", #[['get, ['loggers]], ['set, ['set_loggers]], ['parse, ['parse_itemlist, 'parse_object]], ['format, ['format_itemlist]]]], ["deny-hosts", #[['get, ['deny_hosts]], ['set, ['set_deny_hosts]], ['parse, ['parse_itemlist, 'parse_deny_host]], ['format, ['format_itemlist]]]], ["deny-users", #[['get, ['deny_users]], ['set, ['set_deny_users]], ['parse, ['parse_itemlist, 'parse_deny_user]], ['format, ['format_itemlist]]]], ["backup-interval", #[['get, ['get_backup_interval]], ['set, ['set_backup_interval]], ['parse, ['parse_backup_interval]], ['format, ['fmt_backup_interval]]]], ["validate-email-addresses", #[['parse, ['is_boolean]], ['format, ['format_boolean]], ['get, ['validate_email_addresses]], ['set, ['set_validate_email_addresses]]]], ["initial-quota", #[['get, ['get_initial_quota]], ['set, ['set_initial_quota]], ['parse, ['parse_initial_quota]], ['format, ['fmt_initial_quota]]]], ["new-user-class", #[['get, ['get_new_user_class]], ['set, ['set_new_user_class]], ['parse, ['parse_new_user_class]], ['format, ['format_object]]]], ["anonymous-user-class", #[['get, ['get_anon_user_class]], ['set, ['set_anon_user_class]], ['parse, ['parse_anon_user_class]], ['format, ['format_object]]]], ["startup-objects", #[['get, ['get_startup_objects]], ['set, ['set_startup_objects]], ['parse, ['parse_itemlist, 'parse_startup_object]], ['format, ['format_itemlist]]]], ["writable-core", #[['get, ['writable_core]], ['set, ['set_writable_core]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["valid-genders", #[['parse, ['parse_itemlist, 'parse_valid_genders]], ['get, ['get_valid_genders]], ['set, ['set_valid_genders]], ['format, ['format_itemlist]]]], ["heartbeat-interval", #[['get, ['get_heartbeat_interval]], ['set, ['set_heartbeat_interval]], ['parse, ['parse_heartbeat_interval]], ['format, ['fmt_heartbeat_interval]]]]];
  new = #[["loggers", #[['get, ['loggers]], ['set, ['set_loggers]], ['parse, ['parse_itemlist, 'parse_object]], ['format, ['format_itemlist]]]], ["deny-hosts", #[['get, ['deny_hosts]], ['set, ['set_deny_hosts]], ['parse, ['parse_itemlist, 'parse_deny_host]], ['format, ['format_itemlist]]]], ["deny-users", #[['get, ['deny_users]], ['set, ['set_deny_users]], ['parse, ['parse_itemlist, 'parse_deny_user]], ['format, ['format_itemlist]]]], ["backup-interval", #[['get, ['get_backup_interval]], ['set, ['set_backup_interval]], ['parse, ['parse_backup_interval]], ['format, ['fmt_backup_interval]]]], ["validate-email-addresses", #[['parse, ['is_boolean]], ['format, ['format_boolean]], ['get, ['validate_email_addresses]], ['set, ['set_validate_email_addresses]]]], ["initial-quota", #[['get, ['get_initial_quota]], ['set, ['set_initial_quota]], ['parse, ['parse_initial_quota]], ['format, ['fmt_initial_quota]]]], ["new-user-class", #[['get, ['get_new_user_class]], ['set, ['set_new_user_class]], ['parse, ['parse_new_user_class]], ['format, ['format_object]]]], ["anonymous-user-class", #[['get, ['get_anon_user_class]], ['set, ['set_anon_user_class]], ['parse, ['parse_anon_user_class]], ['format, ['format_object]]]], ["startup-objects", #[['get, ['get_startup_objects]], ['set, ['set_startup_objects]], ['parse, ['parse_itemlist, 'parse_startup_object]], ['format, ['format_itemlist]]]], ["writable-core", #[['get, ['writable_core]], ['set, ['set_writable_core]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["valid-genders", #[['parse, ['parse_itemlist, 'parse_valid_genders]], ['get, ['get_valid_genders]], ['set, ['set_valid_genders]], ['format, ['format_itemlist]]]], ["heartbeat-interval", #[['get, ['get_heartbeat_interval]], ['set, ['set_heartbeat_interval]], ['parse, ['parse_heartbeat_interval]], ['format, ['fmt_heartbeat_interval]]]], ["traceback-for", #[['parse, ['parse_traceback_for_setting]]]]];
  catch any {
  dblog("__upgrade_handle_var(3, defined_settings)");
      defined_settings = .__upgrade_handle_var(3, "$sys<$root>,defined_settings", old, defined_settings, new);
  } with {
      dblog("ERROR: " + traceback()[1][2]);
  }
};

object $sys;

eval {
  .__upgrade_set_var();
};

object $root;
eval {
  del_method('__upgrade_set_var);
};

// old public method $root.__upgrade_set_var();
new method
Replacing protected method $sys.set_valid_genders()

protected method $sys.set_valid_genders() {
    arg name, definer, value;
    
    switch (value[1]) {
        case 'set:
            valid_genders = value[2];
        case 'add:
            valid_genders = setadd(valid_genders, value[2]);
        case 'del:
            valid_genders = setremove(valid_genders, value[2]);
        default:
            throw(~type, "Unknown action: " + (value[1]));
    }
};
new method
Adding private method $sys._logstr()

private method $sys._logstr() {
    arg str;
    
    dblog((("[" + ($time.format("%d %h %y %H:%M"))) + "] ") + str);
};
new method
Replacing public method $sys.parse_valid_genders()

public method $sys.parse_valid_genders() {
    arg value, action, @args;
    var obj, kids, i;
    
    if (!(| (obj = $object_lib.to_dbref("gender_" + value)) |))
        (> (obj = $object_lib.to_dbref(value)) <);
    if (action == 'del) {
        if (!(obj in (.get_valid_genders())))
            throw(~set, ("The object '" + value) + "' is not set, and thus cannot be removed");
        return obj;
    }
    if (!(obj in ($gender.children())))
        throw(~set, ("The object '" + value) + "' is not a child of $gender");
    return obj;
};
new method
Adding public method $sys.slog()

public method $sys.slog() {
    arg msg;
    var l;
    
    if ((!($syslog_group.includes(caller()))) && (!(.is_writable_by(sender()))))
        throw(~perm, "Only objects in the $syslog_group can log.");
    if (type(msg) == 'list) {
        for l in (msg)
            .slog(l);
    } else {
        $channel_ui._broadcast('System, msg);
        ._logstr(msg);
    }
};
new method
Replacing private method $sys.finish_core()

private method $sys.finish_core() {
    var i;
    
    // cleanup heartbeat
    set_heartbeat(1);
    .add_method(TMP_HEARTBEAT_CODE, 'heartbeat);
    .del_var('TMP_HEARTBEAT_CODE);
    
    // ok, finish up
    catch any {
        dblog("** Verifying all non-core objects were destroyed");
        for i in ($root.descendants()) {
            refresh();
            if (!(i.has_flag('core)))
                dblog(("** !!!!! " + i) + " was not destroyed !!!!!");
        }
        .del_var('__making_core);
        dblog("** corifying remaining objects");
        $root.corify();
        dblog("** cleaning database..");
        .clean_database();
        dblog("** shutting down..");
        shutdown();
    } with {
        dblog("traceback: " + traceback());
    }
};
new method
Replacing public method $sys.parse_heartbeat_interval()

public method $sys.parse_heartbeat_interval() {
    arg value, @args;
    
    value = (> $time.from_english(value) <);
    if (value < 1)
        throw(~set, "You cannot set the system heartbeat interval to less than 1 second");
    return value;
};
new method
Adding public method $sys.log_traceback(): forked 

public method $sys.log_traceback(): forked  {
    arg traceback, @command;
    var user, log, mail, l, s;
    
    if ((!($syslog_group.includes(caller()))) && (!(.is_writable_by(sender()))))
        throw(~perm, "Permission denied.");
    [(command ?= "")] = command;
    user = user() || sender();
    log = "Last Command: " + command;
    log = [log, ("User: " + user()) || sender()];
    if (type(traceback[1]) != 'string)
        traceback = $parse_lib.traceback(traceback);
    s = (user() || sender()) + ": received traceback";
    log += traceback;
    if ('__making_core in (.variables()))
        .log(log);
    else
        $no_one.mail_as(0, 0, s, log, $mail_list_tracebacks);
};
new method
Replacing public method $sys.do_backup()

public method $sys.do_backup() {
    arg @args;
    var line, who, how, name, dirty;
    
    (> .perms(sender(), 'system) <);
    if (dict_contains(backup, 'started)) {
        .log("BACKUP CONFLICT");
        line = "BACKUP CONFLICT at " + ($time.format("%r"));
        line += ", Current backup started at " + ($time.format("%r", backup['started]));
        $channel_ui._broadcast('System, line);
        return;
    }
    dirty = .dirty();
    [(who ?= sender()), (how ?= 'request)] = args;
    if (!valid(who))
        who = sender();
    backup = backup.add('next, time() + (backup['interval]));
    backup = backup.add('last, time());
    if ((how == 'interval) && (!dirty))
        return;
    catch any {
        name = who.namef('ref);
        .log(("BACKUP (" + name) + ") ");
        line = (("Backup started at " + ($time.format("%r"))) + " by ") + name;
        $channel_ui._broadcast('System, line);
    }
    
    // double pause will hopefully let people know about it before it happens
    pause();
    pause();
    backup = backup.add('started, time());
    (> backup() <);
};
new method
Replacing public method $sys.configure_core()

public method $sys.configure_core() {
    var list, l, x, t, err, s;
    
    if (caller() != $admin)
        (> .perms(sender()) <);
    s = sender();
    
    // if there is nothing left to config, leave..
    if (configured) {
        if (!(list = config_set.set_difference(configured.keys())))
            return;
    } else {
        configured = #[];
    }
    .add_to_system(s);
    
    // wait for other things to finish printing messages to them
    pause();
    pause();
    
    // expand on this as we go
    s.tell(["*" * 78, strfmt("%78{*}c", " Welcome to ColdCore "), "*" * 78]);
    s.tell(("This is an interactive configuration system which any admin who connects (until it is completed) is sent through.  You must complete this configuration before you can do anything else.  You can skip a specific question at any time by typing '@skip'.  Suggested default values will be enclosed in square brackets.  Pressing enter without any value will use the default value.".wrap_lines(78)).mmap('center, 78));
    s.tell("*" * 78);
    
    // first question please
    if (!(configured.contains('new_user_class))) {
        s.tell("What class should new users be created as?  Available classes:");
        list = filter x in ($user.descendants()) where ('general_cache in (x.flags()));
        t = .get_new_user_class();
        list = map x in (list) to ((list == t) ? (x + " (current class)") : x);
        s.tell(list.prefix("    "));
        while (!l) {
            refresh();
            l = s.prompt(("New User Class [" + t) + "] ");
            if (l == "@skip") {
                s.tell("Skipping..");
                break;
            }
            if (l) {
                catch any {
                    l = $object_lib.to_dbref(l);
                    if (!(l in list))
                        s.tell("Invalid selection, try again.");
                } with {
                    s.tell(("Invalid selection '" + l) + "'");
                    continue;
                }
            } else {
                l = t;
            }
            .set_setting("new-user-class", $sys, l);
            configured = configured.add('new_user_class, 1);
            s.tell("New User Class set to: " + l);
        }
        s.tell(["", "You can set this at any time, with the command:"]);
        s.tell("  @set $sys:new-user-class=" + l);
    }
    refresh();
    
    // server name/title
    if (!(configured.contains('server_name))) {
        s.tell(["", "---"]);
        t = $motd.server_name();
        l = (s.prompt(("What is your server name? [" + t) + "] ")) || t;
        if (l == "@skip") {
            s.tell("Skipping..");
        } else {
            $motd.set_setting("server-name", $motd, l);
            configured = configured.add('server_name, 1);
            s.tell("Server name set to: " + l);
        }
        s.tell(["", "You can set this at any time, with the command:"]);
        s.tell("  @set $motd:server-name=" + l);
    }
    refresh();
    if (!(configured.contains('server_title))) {
        s.tell(["", "---"]);
        t = $motd.server_title();
        l = (s.prompt(("What is your server title? [" + t) + "] ")) || t;
        if (l == "@skip") {
            s.tell("Skipping..");
        } else {
            $motd.set_setting("server-title", $motd, l);
            configured = configured.add('server_title, 1);
            s.tell("Server title set to: " + l);
        }
        s.tell(["", "You can set this at any time, with the command:"]);
        s.tell("  @set $motd:server-title=" + l);
    }
    refresh();
    if (!(configured.contains('daemons))) {
        s.tell(["", "---"]);
        while (1) {
            refresh();
            list = ($daemon.children()).setremove($login_daemon);
            s.tell("Which network daemons do you want to have automatically startup,");
            s.tell("Other than $login_daemon.  Available daemons:");
            t = filter l in (startup['objects]) where (l.is($daemon));
            for l in (list) {
                if (l in t)
                    s.tell(strfmt("  %20s (auto starting)", l));
                else
                    s.tell("  " + l);
            }
            l = s.prompt(("Auto-Start: [" + (t.join(", "))) + "] ");
            if (l == "@skip") {
                s.tell("Skipping..");
                break;
            } else if (!l) {
                s.tell("Using existing daemons: " + (t.join(", ")));
                configured = configured.add('daemons, 1);
                break;
            } else {
                err = 0;
                for x in (l.explode_english_list()) {
                    catch any {
                        .set_setting("startup-objects", $sys, "+" + x);
                        s.tell(("Added " + x) + " as a startup daemon.");
                    } with {
                        s.tell(("Unable to add '" + x) + "' as a daemon:");
                        s.tell("=> " + ((traceback()[1])[2]));
                        err++;
                    }
                }
                if (!err) {
                    configured = configured.add('daemons, 1);
                    break;
                }
                s.tell("Errors occurred...");
            }
        }
        s.tell(["", "You can set this at any time, with the command:"]);
        s.tell("  @set $motd:startup-objects=OBJECTS...");
    }
    
    // Other things to add: HTTP Virtual Hosting info,
    // Let them know, if they actually saw anything..
    s.tell(["", strfmt("%79{*}c", " Configuration Complete ")]);
};
new method
Replacing public method $sys.log()

public method $sys.log() {
    arg msg;
    var l;
    
    if ((!($syslog_group.includes(caller()))) && (!(.is_writable_by(sender()))))
        throw(~perm, "Only objects in the $syslog_group can log.");
    if (type(msg) == 'list) {
        for l in (msg)
            .log(l);
    } else {
        ._logstr(msg);
    }
};
new method
Adding public method $sys.parse_traceback_for_setting()

public method $sys.parse_traceback_for_setting() {
    arg value, @args;
    var obj;
    
    obj = (> $object_lib.to_dbref(value) <);
    if (!(obj.is($user)))
        throw(~invset, "Setting must be a user type class");
    if (!('general_cache in (obj.flags())))
        throw(~invset, "Setting must be a user class");
    return obj;
};
new method
Replacing private method $sys.make_core()

private method $sys.make_core() {
    arg ver;
    var obj, obj2, d, o, top, x, admin, tmp, name;
    
    // core rooms should be +core, and cant be destroyed
    // traverse the list inverseley, less unseen heirarchial shuffling
    .add_var('__making_core);
    dblog("** Starting Core Extraction " + ctime());
    d = $root.descendants();
    top = listlen(d);
    core_version = ver;
    dblog(("** " + top) + " objects total, tidying up core objects...");
    
    // tidy up core objects first
    for obj in (d) {
        refresh();
        if (obj.has_flag('core)) {
            tmp++;
            catch any {
                obj.change_manager(obj);
                for o in (obj.writers('literal)) {
                    refresh();
                    obj.del_writer(o);
                }
            } with {
                dblog(("** TIDY " + obj) + " traceback: ");
                for o in ($parse_lib.traceback(traceback()))
                    dblog("**   " + o);
            }
        }
    }
    
    // nuke anything not core
    dblog(("** " + tmp) + " core objects, destroying non-core objects...");
    for x in [1 .. top] {
        pause();
        obj = d[(top - x) + 1];
        if (!valid(obj)) {
            // dblog(".. Skipping invalid object " + obj);
            continue;
        }
        if (!(obj.has_flag('core))) {
            if (obj.children()) {
                for obj2 in (obj.children()) {
                    if (obj2.has_flag('core)) {
                        dblog("** ABORTING: A NON CORE OBJECT HAS CORE CHILDREN: ");
                        dblog((("** " + obj) + " => ") + (obj.children()));
                        shutdown();
                    }
                }
            }
            catch any {
                // dblog(".. Destroying " + obj);
                obj.destroy();
            } with {
                dblog(("** " + obj) + ".destroy() traceback: ");
                for o in ($parse_lib.traceback(traceback()))
                    dblog("**   " + o);
            }
        }
    }
    
    // shutdown this task so that references can have
    // a chance to clear out, on destroyed objects.
    dblog("** done, suspending for new task **");
    
    // do this the hard way, to be secure--wait a little while for
    // things to wrapup, five seconds should be fine.
    pause();
    set_heartbeat(5);
    .add_var('TMP_HEARTBEAT_CODE, .list_method('heartbeat));
    .add_method([".finish_core();"], 'heartbeat);
};
new method
Adding public method $dictionary.to_dict()

public method $dictionary.to_dict() {
    arg dict;
    
    return dict;
};
new method
Adding public method $string.is_negative()

public method $string.is_negative() {
    arg str;
    
    if (match_regexp(str, "^(no|n|false|f|none|nobody|nowhere|0)$"))
        return 1;
    return 0;
};
new method
Replacing public method $string.decode64()

public method $string.decode64() {
    arg enc_chars;
    var i, j, k, ints, out_buf, len, num, ob;
    
    i = 1;
    out_buf = `[];
    len = enc_chars.length();
    while (i < len) {
        refresh();
        ints = [0, 0, 0, 0];
        for j in [1 .. 4] {
            for k in [1 .. 64] {
                refresh();
                if (strcmp(enc_chars[i], base64str[k]) == 0) {
                    ints = replace(ints, j, (k - 1) % 64);
                    break;
                }
            }
            i++;
        }
        num = 0;
        out_buf = out_buf + `[(((ints[1]).shleft(2)) % 256) + ((ints[2]).shright(4)), (((ints[2]).shleft(4)) % 256) + ((ints[3]).shright(2)), (((ints[3]).shleft(6)) % 256) + (ints[4])];
    }
    return buf_to_str(out_buf);
};
new method
Adding public method $string.reverse()

public method $string.reverse() {
    arg string;
    var length, output, x;
    
    length = string.length();
    output = "";
    for x in [1 .. length]
        output += string[(length - x) + 1];
    return output;
};
new method
Adding public method $string.regexp_escape()

public method $string.regexp_escape() {
    arg str;
    
    // anticipate_assignment();
    return strsed(str, "([[\^$|)(.*+?])", "\%1", "g");
};
new method
Adding public method $string.is_positive()

public method $string.is_positive() {
    arg str;
    
    if (match_regexp(str, "^(yes|y|true|t|all|everybody|anybody|everywhere|anywhere|1)$"))
        return 1;
    return 0;
};
new method
Replacing public method $object_lib.get_name()

public method $object_lib.get_name() {
    arg obj, @args;
    var meth;
    
    // get_name(obj, 'method, [args]) (3rd arg must be a list)
    if ((type(obj) == 'frob) && (!valid(frob_class(obj))))
        return toliteral(obj);
    if ((type(obj) != 'frob) && (!valid(obj)))
        return toliteral(obj);
    [(meth ?= 'name), (args ?= [])] = args;
    return obj.(meth)(@args);
};
new method
Replacing public method $parse_lib.traceback()

public method $parse_lib.traceback() {
    arg traceback, @args;
    var line, out, pre, lines, cur, x, error;
    
    // $parse_lib.traceback(traceback(), lines, pre);
    // -1 lines represents the full error
    // pre is set to "! " unless otherwise specified.
    [(lines ?= -1), (pre ?= "! "), (error ?= 0)] = args;
    out = [(pre + "=> ") + ((traceback[1])[2])];
    pre += "   ";
    
    // The primary error
    if (error == 0)
        out += [(pre + "Thrown by ") + (._traceback(@(traceback[2]).subrange(2)))];
    else
        out += [(((pre + "Error ") + error) + " caused by ") + (._traceback(@(traceback[2]).subrange(2)))];
    
    // The rest of it
    for x in [1 .. (traceback.length()) - 2] {
        if ((x <= lines) || (lines == (-1))) {
            line = ((traceback[x + 2])[1]) + ": ";
            line += ._traceback(@(traceback[x + 2]).subrange(2));
            out += [pre + line];
        }
    }
    if (user())
        user().set_last_traceback([time(), traceback, out]);
    return out;
};
new method
Replacing public method $parse_lib._traceback()

public method $parse_lib._traceback() {
    arg what, @more;
    var line;
    
    if (more) {
        if ((more[1]) == (more[2]))
            return ((((more[1]) + ".") + what) + "() line ") + (more[3]);
        else
            return ((((((more[1]) + "<") + (more[2])) + ">.") + what) + "() line ") + (more[3]);
    } else {
        return what;
    }
};
new method
Replacing public method $parse_lib.opt()

public method $parse_lib.opt() {
    arg line, @defs;
    var out, a, l, x, m, args, opts, o, i, v;
    
    // submit: ["template", "template"..]
    // => if value is 1, it will take the next part of the string
    // receive: [["template", "flag", bool, value]], [...]];
    opts = (args = []);
    line = line.explode_quoted();
    l = listlen(line);
    x = 1;
    while (x <= l) {
        a = line[x];
        if ((m = regexp(a, "^[+-]"))) {
            o = (m[1]) == "+";
            v = "";
            a = substr(a, 2).trim();
            if (!a)
                throw(~stop, ("Missing option flag following '" + (o ? "+" : "-")) + "'");
            if ((i = "=" in a)) {
                if (i == strlen(a)) {
                    v = line[++x];
                    a = substr(a, 1, strlen(a) - 1).trim();
                } else {
                    [a, v] = explode(a, "=", 1);
                }
            }
            if ((i = find m in (defs) where (match_template(a, m))))
                opts += [[defs[i], a, o, v]];
            else
                opts += [[0, a, o, v]];
        } else {
            args += [a];
        }
        x++;
    }
    return [args, opts];
};
new method
Replacing public method $code_lib.parse_name()

public method $code_lib.parse_name() {
    arg name, @def;
    var article, match, flag, type, tmps, ignore;
    
    // used to parse $has_name names and name templates
    [name, flag] = (> $parse_lib.opt(name, "u?nique", "p?roper", "n?ormal", "i?gnore") <);
    name = name.join();
    
    // Parse +prop +norm +uniq and +ignore flags
    if (flag) {
        def = [@def, ["p?roper", "p", 1, ""]][1];
        flag = (| flag.last() |) || def;
        if ((flag[1]) == "i?gnore") {
            article = 'prop;
            ignore = 1;
        } else {
            switch (flag[1]) {
                case "n?ormal":
                    type = 'normal;
                case "u?nique":
                    type = 'uniq;
                case "p?roper":
                    type = 'prop;
            }
            article = type;
        }
    } else {
        article = 'prop;
    }
    [name, @tmps] = name.split(" *, *");
    
    // Check to see if the name already has articles in it.
    if (!ignore) {
        if ((match = name.regexp("^the +(.*)$"))) {
            article = 'uniq;
            name = match[1];
        } else if ((match = name.regexp("^(a|an) +(.*)$"))) {
            article = 'normal;
            name = match[2];
        }
    
        // Complain if the flag does not agree with the given article
        if (type && (article != type))
            throw(~article, (("Conflicting name types " + type) + " and ") + article);
    }
    return [[name, article], tmps];
};
new method
Replacing public method $foundation.match_environment()

public method $foundation.match_environment() {
    arg str;
    var obj, env, found, match, target;
    
    if (!str)
        throw(~objnf, "No object specified.", str);
    str = str.strip_article();
    
    // Handle special cases.
    if (str in ["me", "my"]) {
        return this();
    } else if (((str[1]) == "$") || ((str[1]) == "#")) {
        return (> $object_lib.to_dbref(str) <);
    } else if ((str[1]) == "~") {
        str = str.subrange(2);
        if ((str[1]) != "~")
            return $user_db.match_begin(str);
    } else if (str in ["it", "him", "her"]) {
        return (| .match_context(str) |) || throw(~context, ("I don't see " + str) + " here, do you?");
    }
    
    // Start matching
    found = [];
    env = .environment();
    
    // special case ordinal references
    if ((match = $parse_lib.ordinal_reference(str)))
        return env.match_nth(@match);
    if ((match = $parse_lib.possessive_reference(str))) {
        if ((match[1]) == "me")
            obj = this();
        else
            obj = (> env.match_object(match[1]) <);
        if (!(obj.match_name(str))) {
            catch ~objnf, ~ambig, ~range {
                env = (| obj.contents() |) || [];
                if ((found = $parse_lib.ordinal_reference(match[2])))
                    return (> env.match_nth(@found) <);
                else
                    return (> env.match_object(match[2]) <);
            } with {
                if (error() == ~objnf)
                    throw(~objnf, (((obj.name()) + " does not have ") + ((match[2]).add_indefinite())) + ".");
                else if (error() == ~ambig)
                    throw(~ambig, ((("\"" + str) + "\" can match ") + ((((traceback()[1])[3]).mmap('namef, 'ref)).to_english("", " or "))) + ".");
                else
                    throw(~objnf, (obj.name()) + "'s what?");
            }
        }
    }
    catch any {
        return (> env.match_object(str) <);
    } with {
        if (error() == ~badfrob) {
            target = (traceback()[1])[3];
            obj = frob_value(target)['location];
            obj.del_frob_from_contents(target);
            throw(~badfrob, "Cleaned up bogus frob in your environment, try again..");
        }
        if (error() == ~objnf)
            throw(~objnf, ("You do not see " + (str.add_indefinite())) + " anywhere.");
        if (error() == ~ambig) {
            found = filter obj in ((traceback()[1])[3]) where ((obj.name()) == str);
            if (listlen(found) == 1)
                return found[1];
            if (found)
                found = (found.mmap('namef, 'ref)).to_english("", " or ");
            else
                found = (((traceback()[1])[3]).mmap('namef, 'ref)).to_english("", " or ");
            throw(~ambig, ((("\"" + str) + "\" can match ") + found) + ".");
        }
        rethrow(error());
    }
};
new method
Replacing public method $has_commands.add_command()

public method $has_commands.add_command() {
    arg template, method, @type;
    var cmd, types, count, x;
    
    (> .perms(sender()) <);
    [(type ?= 'local)] = type;
    if ("*" in template)
        throw(~invcmd, "Invalid command, command templates cannot contain \"*\"!.");
    cmd = (> $command_lib.validate_command_template(template) <);
    if (!(type in ['local, 'remote]))
        throw(~type, "Command types can be either 'local or 'remote");
    if ('this in (((cmd[2]).values()).slice(1)))
        type = 'remote;
    if (type == 'remote) {
        for x in (((cmd[2]).values()).slice(1)) {
            if (x == 'this)
                count++;
        }
        if (!count)
            throw(~add_command, "Command type defined as remote with no <this> argument.");
        else if (count > 1)
            throw(~add_command, "More than one <this> argument specified in template.");
    }
    if (!get_var(type))
        set_var(type, #[]);
    set_var(type, get_var(type).setadd_elem((cmd[1])[1], [@cmd[1], template, method, cmd[2]]));
    if (type == 'remote)
        $remote_cache.add_remote_command((cmd[1])[1], this());
    else if (('general_cache in (.flags())) || (| .command_cache() |))
        (| .rehash_cache() |);
};
new method
Replacing root method $has_commands.uninit_has_commands()

root method $has_commands.uninit_has_commands() {
    var c, cmd;
    
    for c in ((.remote_commands()).values()) {
        for cmd in (c)
            .del_command(cmd[3], cmd[4]);
    }
    (| clear_var('remote) |);
    (| clear_var('local) |);
    (| clear_var('shortcuts) |);
};
new method
Replacing public method $has_name.add_name_template()

public method $has_name.add_name_template() {
    arg template;
    var p, r;
    
    (> .perms(sender()) <);
    if ((r = regexp(template, "[^a-z0-9|?_-]+")))
        throw(~invtmpl, "Template contains invalid characters (allowed: a-z, 0-9, _ and -)");
    for p in (explode(template, "|")) {
        if (match_begin(name[2], p.strip()))
            throw(~redundant, ("Redundant name template part \"" + p) + "\" already matches name.");
    }
    templates = setadd(templates || [], template);
};
new method
Adding public method $file.fopen()

public method $file.fopen() {
    arg @args;
    
    return fopen(@args);
};
new method
Adding public method $file.fwrite()

public method $file.fwrite() {
    arg what;
    
    return fwrite(what);
};
new method
Adding public method $file.fclose()

public method $file.fclose() {
    return fclose();
};
old method
Deleting normal method $compiler.do_action()

object $compiler;
eval {
  del_method('do_action);
};
update objvar
Updating objvar $bs_eval<$root>,flags

object $bs_eval;
var $root flags = ['variables, 'methods, 'code, 'core, 'fertile];
new method
Replacing public method $bs_eval.gen_set()

public method $bs_eval.gen_set() {
    arg vars, flags, args;
    
    return [[""], vars.add(((._eval_ctext(flags.getkey("var"), vars))[1])[1], ((._eval_ctext(args[1], vars))[1])[1])];
};
new method
Adding public method $bs_eval.gen_fromliteral()

public method $bs_eval.gen_fromliteral() {
    arg vars, flags, args;
    
    return [[(| fromliteral(((._eval_ctext(args[1], vars))[1])[1]) |)], vars];
};
new method
Adding public method $bs_eval.old_gen_set()

public method $bs_eval.old_gen_set() {
    arg vars, flags, args;
    var text, name;
    
    name = flags.getkey("var");
    [text, vars] = ._eval_ctext(args[1], vars);
    return [[""], vars.add(name, text[1])];
};
old method
Deleting normal method $plain_format.do_action()

object $plain_format;
eval {
  del_method('do_action);
};
new method
Replacing public method $tkmoo_format.tag_text()

public method $tkmoo_format.tag_text() {
    arg tag;
    var match;
    
    match = tag.match_pattern("* \{text \"*\"\}*");
    if (match)
        return match[2];
    return tag;
    
    // this used to throw:
    // throw(~invtag, "Tag had no text field.");
};
new method
Replacing public method $ansi_format.weed_ansi()

public method $ansi_format.weed_ansi() {
    arg str;
    var out;
    
    out = str.global_regexp("[\]A[0-9A-LN-Za-ln-z;]+m");
    
    //$user_bruce.debug(out);
    //$user_bruce.debug(str);
    return out;
    return str.global_regexp("\\\A[0-9A-Ln-z;a-ln-z;]+[a-z]");
};
old method
Deleting normal method $html_format.do_action()

object $html_format;
eval {
  del_method('do_action);
};
new method
Adding public method $html_format.do_passthru()

public method $html_format.do_passthru() {
    arg vars, flags, args;
    
    args = args[1];
    return [args, vars];
};
new method
Replacing public method $html_format.do_obj()

public method $html_format.do_obj() {
    arg vars, flags, args;
    var gateway, argname, context, object, name, options;
    
    context = flags.getkey("context");
    options = (| flags.getkey("options") |);
    name = flags.getkey("name");
    object = args[1];
    if (type(context) == 'string)
        context = tosym(context);
    if (options && (type(options) == 'string))
        options = tosym(options);
    if (type(object) == 'frob)
        return [name.to_html(), vars];
    switch (context) {
        case 'look:
            if (options) {
                if (options == 'exit) {
                    [gateway, argname] = ["describe", "target"];
                    object = object.dest(args[2]);
                } else {
                    [gateway, argname] = ["describe", "target"];
                }
            } else {
                [gateway, argname] = ["describe", "target"];
            }
        case 'display:
            [gateway, argname] = ["display", "target"];
    }
    return ["<a href=\"/bin/%s?%s=%s\">%s</a>".format(gateway, argname.to_html(), toliteral(object).to_html(), name.to_html()), vars];
};
new method
Replacing public method $housekeeper.did_disconnect()

public method $housekeeper.did_disconnect() {
    var task_queue, task;
    
    if (caller() != $user)
        throw(~perm, "Permission denied");
    
    // Are we removing users?
    if (($world.get_setting("cleanup-disconnected-users", $world)) == 0) {
        return;
    } else {
        // because of guests
        if (valid(sender()))
            $scheduler.add_task(300, 'move_user_home, sender());
    }
};
new method
Replacing public method $settings.is_type()

public method $settings.is_type() {
    arg value, type, @subtypes;
    var i;
    
    if (type(value) == type)
        return value;
    switch (type) {
        case 'list:
            value = fromliteral(value);
            if (type(value) != 'list)
                throw(~type, "Value is unparsable as list.");
            if (subtypes)
                value = map i in (value) to ((> .is_type(i, subtypes[1]) <));
            return value;
        case 'dictionary:
            value = fromliteral(value);
            if (type(value) != 'dictionary)
                throw(~type, "Value is unparsable as dictionary.");
            if (subtypes)
                value = hash i in (value) to ((> [.is_type(i, subtypes[1]), .is_type(i, subtypes[2])] <));
            return value;
        case 'integer:
            if (value.is_numeric())
                return toint(value);
            else
                throw(~type, "Value is unparsable as integer.");
        case 'symbol:
            if ((type(value) == 'string) && (((value.length()) > 1) && ((value[1]) == "'")))
                value = value.subrange(2);
            if (type((| tosym(value) |)) == 'symbol)
                return tosym(value);
            else
                throw(~type, "Value is unparsable as a symbol.");
        case 'objnum:
            return (> $object_lib.to_dbref(value) <);
        default:
            return value;
    }
};
add objvar
Adding objvar $world<$world>,realms

object $world;
var $world realms = [];
update objvar
Updating objvar $world<$root>,settings

public method $root.__upgrade_set_var() {
  var old, new;

  old = #[["managed", []], ["starting-place", $the_pit], ["heartbeat-rate", 600], ["weather-rate", 5000]];
  new = #[["starting-place", $the_pit], ["weather-rate", 5000], ["cleanup-disconnected-users", 1]];
  catch any {
  dblog("__upgrade_handle_var(1, settings)");
      settings = .__upgrade_handle_var(1, "$world<$root>,settings", old, settings, new);
  } with {
      dblog("ERROR: " + traceback()[1][2]);
  }
};

object $world;

eval {
  .__upgrade_set_var();
};

object $root;
eval {
  del_method('__upgrade_set_var);
};

// old public method $root.__upgrade_set_var();
add objvar
Adding objvar $world<$world>,weather_rate

object $world;
var $world weather_rate = 5400;
add objvar
Adding objvar $world<$world>,heartbeat_rate

object $world;
var $world heartbeat_rate = 600;
update objvar
Updating objvar $world<$root>,defined_settings

public method $root.__upgrade_set_var() {
  var old, new;

  old = #[["managed", #[['parse, ['is_type, 'list, 'objnum]]]], ["starting-place", #[['parse, ['is_type, 'objnum]]]], ["heartbeat-rate", #[['parse, ['is_type, 'integer]]]], ["weather-rate", #[['parse, ['is_type, 'integer]]]]];
  new = #[["starting-place", #[['parse, ['is_type, 'objnum]]]], ["heartbeat-rate", #[['parse, ['parse_heartbeat_rate]], ['get, ['get_heartbeat_rate]], ['set, ['set_heartbeat_rate]], ['format, ['fmt_heartbeat_rate]]]], ["weather-rate", #[['parse, ['parse_weather_rate]], ['get, ['get_weather_rate]], ['set, ['set_weather_rate]], ['format, ['fmt_weather_rate]]]], ["realms", #[['get, ['get_realms]], ['set, ['set_realms]], ['parse, ['parse_itemlist, 'parse_realms]], ['format, ['format_itemlist]]]], ["cleanup-disconnected-users", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]];
  catch any {
  dblog("__upgrade_handle_var(3, defined_settings)");
      defined_settings = .__upgrade_handle_var(3, "$world<$root>,defined_settings", old, defined_settings, new);
  } with {
      dblog("ERROR: " + traceback()[1][2]);
  }
};

object $world;

eval {
  .__upgrade_set_var();
};

object $root;
eval {
  del_method('__upgrade_set_var);
};

// old public method $root.__upgrade_set_var();
new method
Adding protected method $world.set_weather_rate()

protected method $world.set_weather_rate() {
    arg name, definer, value;
    
    weather_rate = value;
};
new method
Replacing public method $world.pulse()

public method $world.pulse() {
    var i, d, weather_ticked, t;
    
    (> .perms(sender(), $heart) <);
    t = time();
    weather_ticked = 0;
    if (t >= (last_weather_change + weather_rate)) {
        weather_ticked = 1;
        last_weather_change = t;
    }
    for i in (realms) {
        pause();
        catch any {
            i.advance_weather(weather_ticked);
        } with {
            (| (i.manager()).tell_traceback(traceback()) |);
            (| (i.manager()).tell(("Weather change failed for " + i) + ".") |);
        }
    }
};
new method
Adding protected method $world.set_heartbeat_rate()

protected method $world.set_heartbeat_rate() {
    arg name, definer, value;
    
    heartbeat_rate = value;
    if (heartbeat_rate > 0)
        $heart.add_heartbeat(heartbeat_rate);
};
new method
Adding protected method $world.set_realms()

protected method $world.set_realms() {
    arg name, definer, value;
    
    switch (value[1]) {
        case 'set:
            realms = value[2];
        case 'add:
            realms = setadd(realms, value[2]);
        case 'del:
            realms = setremove(realms, value[2]);
        default:
            throw(~type, "Unknown action: " + (value[1]));
    }
};
new method
Adding public method $world.parse_weather_rate()

public method $world.parse_weather_rate() {
    arg value, @args;
    
    value = (> $time.from_english(value) <);
    if (value < 1)
        throw(~set, "You cannot set the weather rate to less than 1 second");
    return value;
};
new method
Adding public method $world.parse_heartbeat_rate()

public method $world.parse_heartbeat_rate() {
    arg value, @args;
    
    value = (> $time.from_english(value) <);
    if (value < 1)
        throw(~set, "You cannot set the heartbeat rate to less than 1 second");
    return value;
};
new method
Adding public method $world.parse_realms()

public method $world.parse_realms() {
    arg value, action, @args;
    var obj, list;
    
    obj = (> $object_lib.to_dbref(value) <);
    if (!(obj.is($realm)))
        throw(~set, ("The object '" + obj) + "' is not a realm object.");
    return obj;
};
new method
Adding public method $world.get_weather_rate()

public method $world.get_weather_rate() {
    arg @args;
    
    return weather_rate;
};
new method
Replacing public method $world.startup()

public method $world.startup() {
    arg @args;
    
    (> .perms(sender(), 'manager) <);
    if (heartbeat_rate > 0)
        $heart.add_heartbeat(heartbeat_rate);
    last_weather_change = 0;
};
new method
Adding public method $world.fmt_weather_rate()

public method $world.fmt_weather_rate() {
    arg data;
    
    return $time.to_english(data);
};
new method
Adding public method $world.fmt_heartbeat_rate()

public method $world.fmt_heartbeat_rate() {
    arg data;
    
    return $time.to_english(data);
};
new method
Adding public method $world.get_heartbeat_rate()

public method $world.get_heartbeat_rate() {
    arg @args;
    
    return heartbeat_rate;
};
new method
Adding public method $world.get_realms()

public method $world.get_realms() {
    arg @ignored;
    
    return realms;
};
new method
Replacing root method $world.core_world()

root method $world.core_world() {
    .set_setting("realms", $world, "");
    .set_setting("starting-place", $world, $the_pit);
};
update objvar
Updating objvar $motd<$motd>,server_title

object $motd;
var $motd server_title = "Virtual Community Server";
add objvar
Adding objvar $motd<$root>,help_node

object $motd;
var $root help_node = $help_obj_motd;
add objvar
Adding objvar $motd<$root>,settings

object $motd;
var $root settings = #[["login-sequence", ['default]]];
update objvar
Updating objvar $motd<$root>,defined_settings

public method $root.__upgrade_set_var() {
  var old, new;

  old = #[["server-name", #[['get, ['get_server_name_setting]], ['set, ['set_server_name_setting]]]], ["server-title", #[['get, ['get_server_title_setting]], ['set, ['set_server_title_setting]]]]];
  new = #[["server-name", #[['get, ['get_server_name_setting]], ['set, ['set_server_name_setting]]]], ["server-title", #[['get, ['get_server_title_setting]], ['set, ['set_server_title_setting]]]], ["login-sequence", #[['parse, ['is_type, 'list]]]]];
  catch any {
  dblog("__upgrade_handle_var(3, defined_settings)");
      defined_settings = .__upgrade_handle_var(3, "$motd<$root>,defined_settings", old, defined_settings, new);
  } with {
      dblog("ERROR: " + traceback()[1][2]);
  }
};

object $motd;

eval {
  .__upgrade_set_var();
};

object $root;
eval {
  del_method('__upgrade_set_var);
};

// old public method $root.__upgrade_set_var();
new method
Replacing root method $motd.core_motd()

root method $motd.core_motd() {
    server_url = "http://none:1180/";
    .del_method('build_html);
    .rename_method('core_build_html, 'build_html);
    server_name = "ColdCore";
    server_title = "Virtual Community Server";
    welcome_notes = [];
};
new method
Replacing public method $motd.build()

public method $motd.build() {
    arg @args;
    var output, out, line;
    
    output = [];
    if (!args)
        args = ['long, 'quote];
    if ((args[1]) == 'default)
        args = ['name, "", 'title, "", "", 'quote, "", 'notes, 'admins, "", 'connected, 'core_version, 'driver_version, 'help, ""];
    while (args) {
        if (type(args[1]) == 'string) {
            output += [""];
        } else {
            switch (args[1]) {
                case 'long:
                    args = ['title, 'long_name] + sublist(args, 2);
                    continue;
                case 'short:
                    args = ['title, 'name] + sublist(args, 2);
                    continue;
                case 'title:
                    output += [server_title.center(79)];
                case 'name:
                    output += [(("+ " + server_name) + " +").center(79)];
                case 'notes:
                    output += notes.center_lines(79);
                case 'quote:
                    output += ($code_lib.random_quote()).center_lines(79);
                case 'admins:
                    out = ($list.to_english($list.mmap($sys.admins(), 'name))).wrap_lines(50);
                    line = out[1];
                    output += (["Administrators: " + line] + delete(out, 1)).mmap('center, 79);
                case 'connected:
                    out = "Currently Connected users: ";
                    out += tostr(($user_db.connected()).length());
                    out = out.center(79);
                    output += [out];
                case 'version:
                    args = ['driver_version, 'core_version] + sublist(args, 2);
                    continue;
                case 'driver_version:
                    out = "Driver: " + ($sys.server_info('driver_version, 'long));
                    output += [out.center(79)];
                case 'core_version:
                    out = "Core: " + ($sys.server_info('core_version, 'long));
                    output += [out.center(79)];
                case 'help:
                    out = " ** Use 'Help' for a list of commands**";
                    output += [out.center(79)];
            }
        }
        args = delete(args, 1);
    }
    return output;
};
new method
Replacing public method $located.move_to(): nooverride 

public method $located.move_to(): nooverride  {
    arg place;
    var old, mover;
    
    // Don't do anything if we're already here.
    if (place == location)
        return;
    if (!(place.has_ancestor($location)))
        throw(~type, (place.namef('ref)) + " is not a location.");
    if (place == this())
        throw(~move, "You cannot move something into itself.");
    if (!valid(location))
        location = $nowhere;
    mover = sender();
    (> .will_move(mover, place) <);
    (> location.will_leave(mover, place) <);
    (> place.will_arrive(mover, location) <);
    
    // Set location.
    old = location;
    location = place;
    old.del_sender_from_contents();
    place.add_sender_to_contents();
    
    // Notify involved parties of completed move, in reverse order.
    place.did_arrive(mover, old);
    old.did_leave(mover, place);
    .did_move(mover, old);
};
new method
Replacing root method $located.uninit_located()

root method $located.uninit_located() {
    var location;
    
    location = .location();
    if (valid(location)) {
        location.del_sender_from_contents();
        location.did_leave(this(), $nowhere);
    }
};
new method
Replacing public method $thing.parse_home()

public method $thing.parse_home() {
    arg value, @args;
    var home;
    
    home = (| .match_environment(value) |) || (> $place_db.search(value) <);
    if ((!(home.is_writable_by(user()))) && ((!(home.trusts(sender()))) && (!(home.get_setting("public-home", $place)))))
        throw(~notpublic, ("You do not have permission to make " + (home.name())) + " your home.");
    return home;
};
new method
Replacing public method $thing.boot_cmd()

public method $thing.boot_cmd() {
    arg cmdstr, cmd, this;
    var loc, dest, exit;
    
    loc = .location();
    if (!(| loc.perms(sender(), 'manager) |)) {
        (| .tell((((sender().name()) + " tried to boot you from ") + (loc.name())) + "!") |);
        loc.announce((((((sender().name()) + " tried to boot ") + (.name())) + " from ") + (loc.name())) + "!", sender(), this());
        return ((("Only " + ((loc.manager()).name())) + " can boot people from ") + (loc.name())) + "!";
    }
    dest = .home();
    catch any {
        sender().tell(("You boot " + (.name())) + ".");
        loc.announce((((((sender().name()) + " boots ") + (.name())) + " from ") + ((.location()).name())) + ".", this(), sender());
        if ((sender().location()) != loc)
            (sender().location()).announce((((((sender().name()) + " boots ") + (.name())) + " from ") + ((.location()).name())) + ".", this(), sender());
        (> .move_to(dest) <);
    } with {
        return (traceback()[1])[2];
    }
};
update objvar
Updating objvar $note<$root>,flags

object $note;
var $root flags = ['core];
new method
Replacing public method $page_bin_index._show_object()

public method $page_bin_index._show_object() {
    arg obj, what;
    var top, middle, bottom, desc, alert, nalert, line;
    
    middle = (bottom = []);
    top = [("<h1>" + (._make_object_href(obj))) + "</h1>"];
    
    // CORENOTE: merge this with a central location (likely $directories)
    alert = ("<p><font size=\"+1\" color=\"#" + (($cml_color.get_color("red"))[1])) + "\"><b>";
    nalert = "</b></font>";
    top += ["<table>"];
    top += [("<tr><td><b>Perms</b>:</td><td>" + (((.flags()).prefix("+")).join())) + "</td></tr>", ("<tr><td><b>Size</b>:</td><td>" + ((obj.size()).to_english())) + " bytes (on disk)</td></tr>", ("<tr><td><b>Manager</b>:</td><td>" + (._make_object_href(obj.manager()))) + "</td></tr>", ._show_header_objs(obj.writers('literal), "Writer"), ._show_header_objs(obj.parents(), "Parent")];
    if (obj.has_ancestor($located))
        top += [("<tr><td><b>Location</b>:</td><td>" + (._make_object_href(obj.location()))) + "</td></tr>"];
    if (obj.help_node())
        top += [((("<tr><td><b>Associated Help</b>:</td><td><a href=\"/bin/help?node=" + (obj.help_node())) + "\">") + (obj.help_node())) + "</a></td></tr>"];
    top += [("<tr><td><b>Credit</b>:</td><td>" + join(obj.credit(), "<br>")) + "</td></tr>"];
    top += ["</table><p><hr size=1 noshade><p>"];
    if (obj.has_ancestor($described)) {
        if (what['desc]) {
            bottom += ["<p><b>Description</b>:<blockquote><pre>"];
            desc = obj.prose();
            switch (type(desc)) {
                case 'frob:
                    for line in (desc.uncompile())
                        bottom += line.wrap_lines(79, " ");
                case 'list:
                    bottom += desc;
                case 'string:
                    bottom += [desc];
            }
            bottom += ["</pre></blockquote>"];
            middle += [._make_show_object_href("Hide Description", obj, what, 'desc, 0)];
        } else {
            middle += [._make_show_object_href("Show Description", obj, what, 'desc, 1)];
        }
        top += ["</td></tr>"];
    }
    if (what['methods]) {
        if (!(obj.has_flag('methods, this())))
            bottom += [(alert + "** No permission to List Methods **") + nalert];
        else
            bottom += (["<p><b>Methods:</b><blockquote><pre>"] + (._show_methods(obj))) + ["</pre></blockquote>"];
        middle += [._make_show_object_href("Hide Methods", obj, what, 'methods, 0)];
    } else {
        middle += [._make_show_object_href("List Methods", obj, what, 'methods, 1)];
    }
    if (what['vars]) {
        if (!(obj.has_flag('variables, this())))
            bottom += [(alert + "** No permission to Show Variables **") + nalert];
        else
            bottom += (["<p><b>Variables:</b><blockquote><pre>"] + (._show_variables(obj))) + ["</pre></blockquote>"];
        middle += [._make_show_object_href("Hide Variables", obj, what, 'vars, 0)];
    } else {
        middle += [._make_show_object_href("Show Variables", obj, what, 'vars, 1)];
    }
    return (((top + middle) + ["<p>"]) + bottom) + ["<p>"];
};
new method
Replacing public method $page_bin_index.object()

public method $page_bin_index.object() {
    arg header, info, args;
    var out, obj, o, line, objs, m;
    
    obj = (| args["target"] |);
    out = [@.build_header(header, info, args, obj.namef('xref)), ("<h1 align=center>" + (._make_display_href(obj, "&methods=1"))) + "</h1>"];
    line = "<p align=center><b>Parent(s)</b>: " + ((| ._make_object_href((obj.parents())[1]) |) || "(none)");
    for o in ((| (obj.parents()).subrange(2) |) || [])
        line += ", " + (._make_object_href(o));
    out += [line + "</p>", "<table>"];
    objs = obj.children();
    if (obj) {
        out += ["<p align=center><b>Children:</b></p>", "<center><table  cellspacing=0 cellpadding=0>", "<tr><td width=25%><b>Name</b></td><td width=25%><b>Perms</b></td><td width=25%><b>Size</b></td><td width=25%><b>Manager</b></td></tr>"];
        for o in (objs) {
            refresh();
            m = o.manager();
            if (!valid(o))
                m = toliteral(m);
            else
                m = ._make_object_href(m);
            out += [((((((("<tr><td>" + (._make_object_href(o))) + "</td><td>") + ($object_lib.see_perms(o, ["", ""]))) + "</td><td>") + ((o.size()).to_english())) + "</td><td>") + m) + "</td></tr>"];
        }
    }
    out += ["</table><p>", join(obj.credit(), "<br>"), "</center>"];
    return [out + (.build_footer(header, info, args))];
};
new method
Adding public method $page_bin_index._foof()

public method $page_bin_index._foof() {
    arg @args;
    
    return [];
};
new method
Replacing public method $page_bin_index.method()

public method $page_bin_index.method() {
    arg header, info, args;
    var ref, str_ref, name, obj, code, def, out, line, linenumbers, user, strings, flags, trace, anc, current, m, options;
    
    ref = (| args["target"] |);
    linenumbers = (| args["linenumbers"] |);
    if (!("linenumbers" in (args['arg_list]))) {
        if ($security_lib.check_userdb_with_optional(header['interface])) {
            user = (header['interface]).get_info('run_as);
            linenumbers = (| user.get_setting("www-show-line-num", $www_preferences) |) || 0;
        }
    }
    catch any {
        name = (> tosym(ref[4]) <);
        obj = ref[3];
        def = obj.find_method(name);
        if ('native in (def.method_flags(name)))
            code = ["This method is implemented natively within the driver."];
        else
            code = (def.list_method(name)).mmap('html_escape);
        options = (("linenumbers" in (args['arg_list])) && linenumbers) ? [["linenumbers", "yes"]] : [];
        code = $code_lib.code_to_html(code, obj, options);
        if (linenumbers)
            code = code.numbered_text();
        str_ref = ((obj + ".") + name) + "()";
        out = [@.build_header(header, info, args, str_ref), ((((("<h1>Method code for " + (._make_string_to_display_href(obj, "&methods=yes"))) + ((def != obj) ? (("&lt;" + (._make_string_to_display_href(def, "&methods=yes"))) + "&gt;") : "")) + ".") + name) + "()") + "</h1>", "<blockquote>"];
        strings = linenumbers ? ["no", "off"] : ["yes", "on"];
        out += [strfmt("[<A HREF=\"/bin/method?target=%s&linenumbers=%s\">Turn %s line numbering</A>]", str_ref, @strings)];
        out += ["<hr size=1 noshade width=\"50%\" align=left><pre>"];
        out += code + ["</pre><hr size=1 noshade width=\"50%\" align=left>"];
        line = "// " + ((def.credit()).join("<br>// "));
        out += [("<font color=\"#a0a0a0\">" + line) + "</font>"];
        out += ["</blockquote>"];
        strings = (trace = []);
        current = def;
        while (current) {
            trace += [current];
            current = (| def.find_next_method(name, current) |);
        }
        if ((trace.length()) > 1) {
            out += ["<h2>Method Ancestry Override:</h2>"];
            out += ["<blockquote><pre>"];
            for anc in (trace) {
                m = anc.method_info(name);
                out += [strfmt(("%5l %4r " + (._make_string_to_display_href(anc))) + (._make_method_href([anc, name, m[1]], @options)), $object_lib.parse_method_flags(m[6]), m[4])];
            }
            out += ["</pre></blockquote>"];
        }
    } with {
        switch (error()) {
            case ~type:
                return [(header['interface]).response(400, ((("Invalid method reference " + obj) + ".") + name) + "()")];
            case ~methodnf:
                line = ((obj + ".") + name) + "()";
                return [(header['interface]).response(400, line + " not found.")];
            default:
                return [(header['interface]).response(400, (traceback()[1])[2])];
        }
    }
    return [out + (.build_footer(header, info, args))];
};
add objvar
Adding objvar $mail_message<$mail_message>,frominet

object $mail_message;
var $mail_message frominet = 0;
new method
Replacing public method $mail_message.send()

public method $mail_message.send() {
    arg @recips;
    var r, valid, invalid, from;
    
    if (!($mail_lib.has_mail_perms(caller())))
        (> .perms(sender()) <);
    if (delivered)
        throw(~delivered, "This mail has already been delivered.");
    if (!recips)
        recips = .recipients();
    if (((recips.length()) == 1) && ((recips[1]) == $no_one))
        throw(~norcpt, "No recipients specified.");
    valid = [];
    invalid = [];
    for r in (recips) {
        if (r.has_ancestor($mail_list))
            valid += [r];
        else
            invalid += [r];
    }
    if (invalid)
        throw(~invrcpt, "Invalid mail recipients: " + (invalid.mmap('name)), invalid);
    recips = valid;
    invalid = [];
    
    // ok, now that we have that cleared up, lets set pertinent info...
    .set_time(time());
    if ((!(.from())) || (sender() != $no_one))
        .set_from(sender());
    
    // and now to finalize the recipients
    for r in (recips) {
        if ((r.list_is_inet()) && (!frominet)) {
            from = (sender().user_info("name")) || (sender().name());
            from += (" <" + (sender().user_info("email"))) + ">";
            r = r.get_setting("inet-list", $mail_list);
            $smtp.sendmail(from, r, header['subj], .body());
            delivered++;
        } else if (r.list_is_sendable_by(sender())) {
            r.add_mail();
            .add_recipient(r);
            delivered++;
        } else {
            invalid += [r];
        }
    }
    if (!delivered)
        throw(~delivered, "Unable to deliver message.");
    return invalid;
};
new method
Adding public method $mail_message.is_frominet()

public method $mail_message.is_frominet() {
    if (sender() == $no_one)
        frominet = 1;
};
new method
Replacing public method $command_cache.command_modules()

public method $command_cache.command_modules() {
    arg @args;
    
    return modules || [];
};
new method
Replacing public method $command_cache.cache_server_uninit()

public method $command_cache.cache_server_uninit() {
    var user;
    
    if (!(sender().has_ancestor(this())))
        throw(~nochild, ((sender() + " is not a descendant of ") + this()) + ".");
    
    // see if anybody still needs us, otherwise purge
    if (.is_general_cache()) {
        for user in ($user_db.connected()) {
            if (user.has_ancestor(this()))
                return;
        }
    }
    .purge_cache();
};
new method
Replacing public method $command_cache.del_command_module()

public method $command_cache.del_command_module() {
    arg module;
    
    (> .perms(sender()) <);
    modules = setremove(modules || [], module);
    module.cache_server_uninit();
};
new method
Replacing public method $command_cache.match_shortcut()

public method $command_cache.match_shortcut() {
    arg str, @ignore;
    var s, match, obj, args;
    
    for obj in (([this()] + filter s in (parents()) where (s.has_ancestor($command_cache))) + modules) {
        for s in ((obj.shortcut_cache()) || []) {
            if ((match = match_pattern(str, s[1])) != 0) {
                args = $command_lib.handle_shortcut_fields((s[2])[2], match);
                return ['shortcut, [(s[2])[1], [str, @args]]];
            }
        }
    }
    return 0;
};
new method
Replacing protected method $command_cache.set_command_modules()

protected method $command_cache.set_command_modules() {
    arg name, definer, value;
    var m;
    
    switch (value[1]) {
        case 'set:
            for m in (modules.set_difference(value[2]))
                .del_command_module(m);
            for m in ((value[2]).set_difference(modules))
                .add_command_module(m);
        case 'add:
            .add_command_module(value[2]);
        case 'del:
            .del_command_module(value[2]);
        default:
            throw(~type, "Unknown action: " + (value[1]));
    }
};
new method
Replacing public method $command_cache.match_remote_command()

public method $command_cache.match_remote_command() {
    arg str, cmd, args;
    var command, m, matched, templates, info, cdef, def, cmds, c;
    
    if (this() != $remote_cache)
        throw(~perm, "This should only be used on $remote_cache");
    templates = (matched = []);
    if (commands && dict_contains(commands, cmd))
        cmds = commands[cmd];
    else
        return 0;
    for command in (cmds) {
        if (!(info = (command[2]).command_info('remote, command[1])))
            continue;
        for cdef in (info) {
            if ((m = match_template(args, cdef[2])) != 0)
                matched += [[listlen(m), command[2], [str, cmd, @m], @sublist(cdef, 3)]];
        }
        templates = templates.union(info.slice(3));
        refresh();
    }
    if (matched)
        return ['remote, matched];
    if (!templates)
        return 0;
    return ['partial, templates];
};
new method
Replacing root method $command_cache.uninit_command_cache()

root method $command_cache.uninit_command_cache() {
    var m;
    
    (| .purge_cache() |);
    for m in (modules || [])
        m.cache_server_uninit();
};
update objvar
Updating objvar $mail_list<$root>,flags

object $mail_list;
var $root flags = ['methods, 'code, 'core, 'variables, 'fertile];
update objvar
Updating objvar $mail_list<$root>,defined_settings

public method $root.__upgrade_set_var() {
  var old, new;

  old = #[["inet-list", #[['parse, ['parse_inet_list_setting]]]]];
  new = #[["inet-list", #[['parse, ['parse_inet_list_setting]]]], ["mail-readers", #[['get, ['get_maillist_setting]], ['set, ['set_maillist_setting]], ['parse, ['parse_maillist_setting]], ['format, ['fmt_maillist_setting]]]], ["mail-senders", #[['get, ['get_maillist_setting]], ['set, ['set_maillist_setting]], ['parse, ['parse_maillist_setting]], ['format, ['fmt_maillist_setting]]]], ["mail-notify", #[['get, ['get_maillist_setting]], ['set, ['set_maillist_setting]], ['parse, ['parse_maillist_setting]], ['format, ['fmt_maillist_setting]]]]];
  catch any {
  dblog("__upgrade_handle_var(3, defined_settings)");
      defined_settings = .__upgrade_handle_var(3, "$mail_list<$root>,defined_settings", old, defined_settings, new);
  } with {
      dblog("ERROR: " + traceback()[1][2]);
  }
};

object $mail_list;

eval {
  .__upgrade_set_var();
};

object $root;
eval {
  del_method('__upgrade_set_var);
};

// old public method $root.__upgrade_set_var();
new method
Adding public method $mail_list.get_maillist_setting()

public method $mail_list.get_maillist_setting() {
    arg name, definer;
    
    name = tosym(substr(name, 6));
    if ((name == 'readers) || ((name == 'senders) || (name == 'notify)))
        return get_var(name);
    throw(~perm, "Permission Denied");
};
new method
Replacing root method $mail_list.init_mail_list()

root method $mail_list.init_mail_list() {
    mail = [];
    senders = 1;
    if (!(.has_ancestor($user))) {
        readers = 1;
        notify = [];
        (| $mail_db.insert(.name(), this()) |);
    } else {
        readers = [.manager()];
        notify = [.manager()];
    }
};
new method
Replacing root method $mail_list.uninit_mail_list()

root method $mail_list.uninit_mail_list() {
    var m;
    
    for m in (mail)
        .del_mail(m);
    mail = [];
    senders = 1;
    readers = [.manager()];
    notify = [];
    if (!(.has_ancestor($user)))
        (| $mail_db.remove(.name()) |);
    $smtp.remove_aliases();
};
new method
Adding public method $mail_list.parse_maillist_setting()

public method $mail_list.parse_maillist_setting() {
    arg value;
    var action, list, item, out;
    
    value = value.trim();
    if (value.is_positive())
        return ['set, 1];
    else if ((value.is_negative()) || (value == "writers"))
        return ['set, 0];
    if (value && ((value[1]) in ["+", "-"])) {
        if ((value[1]) == "-")
            action = 'del;
        else
            action = 'add;
        list = [substr(value, 2)];
    } else {
 

Showing the first 100 KB of 353.3 KB. Download the archive for the full file.

Site Stats

Snippets: 1791
Codebases: 571