Method code for $builder.undefine_msg_cmd()

[Turn on line numbering]
arg cmdstr, cmd, args;
var what, opts, def;

(> .perms(caller(), 'command) <);

// it niggles the string enough to 'clean' up little mistakes
[args, opts] = (> $parse_lib.opt(args, "b?ranches", "c?ompiler") <);
args = join(args);
what = split(args, " *: *");
if (listlen(what) != 2)
    return "Invalid message reference " + args;
[def, what] = what;
what = what.trim();
def = (> .match_env_nice(def) <);
if (!def.is_writable_by(this()))
    return "You cannot define messages on " + def.namef('ref) + ".";
catch any {
    (> def.undefine_msg(what) <);
    .tell("Message " + def + ":" + what + " undefined.");
} with {
    return traceback()[1][2];
}

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark