Method code for $root.del_var()

[Turn off line numbering]
  1: arg name;
  2: var n, obj, errs;
  3: 
  4: caller() == definer() || (> .perms(sender()) <);
  5: (> $sys.touch() <);
  6: 
  7: // try and clear the variable on all of the descendants, before 
  8: // deleting the variable...since we are root, dont use the standard  
  9: // hooks as perms may not be right
 10: n = tosym("_dclear_var_" + tostr(time()));
 11: catch any {
 12:     add_method(["clear_var('" + name + ");"], n);
 13:     for obj in (.descendants()) {
 14:         (| obj.(n)() |);
 15:         pause();
 16:     }
 17: }
 18: (| del_method(n) |);
 19: 
 20: // now delete the variable
 21: (> del_var(name) <);
 22: if ('core in .flags())
 23:     $changelog.log("DEL-VAR: " + this() + "," + name + " by " + sender());

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

the Cold Dark