[Turn on line numbering]arg alias; var tmp, obj, o; tmp = explode(alias, ":"); if (listlen(tmp) != 2) throw(~type, "Invalid alias pair '" + alias + "', should be ALIAS:OBJ"); [alias, obj] = tmp; tmp = strsed(alias, "[^a-z0-9\.-]+", "", "g"); if (tmp != alias) throw(~type, "Alias must be composed of a-z, 0-9, a period or a dash"); if (obj && obj[1] == "$") { if (!(o = (| $object_lib.to_dbref(obj) |))) throw(~type, "Invalid object: " + obj); } else if (!(o = (| $mail_lib.match_mail_recipient(obj) |))) { throw(~type, "Invalid mail recipient: " + obj); } if (!o.is($mail_list)) throw(~type, "Object " + o + " is not a valid mail recipient."); return [alias, o];
// Created 13-Oct-1996 as a part of ColdCore, see: @help Credit