[Turn on line numbering]
arg cmdstr, cmd, who;
var loc, p, user;
(> .perms(caller(), 'command) <);
if (!who) {
.tell("Specify a user to join.");
return;
}
catch any {
if (who[1] in "$#") {
user = (> $object_lib.to_dbref(who) <);
if (!user.has_ancestor($thing))
return "You can only join things in the VR.";
} else {
user = (> $user_db.search(who) <);
}
} with {
.tell(traceback()[1][2]);
return;
}
loc = user.location();
if (loc == .location()) {
.tell("You are already with " + user.name() + "!");
return;
}
if (!.teleport(loc))
.tell("Sorry.");
else
.tell("You join " + user.name() + ".");
// $#Copied 14 Aug 01 21:33 from $programmer.join_cmd() by $brandon
["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]