tmi2_fluffos_v2/
tmi2_fluffos_v2/bin/
tmi2_fluffos_v2/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/ChangeLog.old/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/Win32/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/simuls/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/clone/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/command/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/data/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/master/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/log/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/compiler/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/efuns/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/operators/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/u/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/tmp/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/windows/
tmi2_fluffos_v2/lib/
tmi2_fluffos_v2/lib/adm/
tmi2_fluffos_v2/lib/adm/daemons/languages/
tmi2_fluffos_v2/lib/adm/daemons/network/I3/
tmi2_fluffos_v2/lib/adm/daemons/virtual/
tmi2_fluffos_v2/lib/adm/daemons/virtual/template/
tmi2_fluffos_v2/lib/adm/news/
tmi2_fluffos_v2/lib/adm/obj/
tmi2_fluffos_v2/lib/adm/obj/master/
tmi2_fluffos_v2/lib/adm/priv/
tmi2_fluffos_v2/lib/adm/shell/
tmi2_fluffos_v2/lib/adm/tmp/
tmi2_fluffos_v2/lib/cmds/
tmi2_fluffos_v2/lib/d/
tmi2_fluffos_v2/lib/d/Conf/
tmi2_fluffos_v2/lib/d/Conf/adm/
tmi2_fluffos_v2/lib/d/Conf/boards/
tmi2_fluffos_v2/lib/d/Conf/cmds/
tmi2_fluffos_v2/lib/d/Conf/data/
tmi2_fluffos_v2/lib/d/Conf/logs/
tmi2_fluffos_v2/lib/d/Conf/obj/
tmi2_fluffos_v2/lib/d/Conf/text/help/
tmi2_fluffos_v2/lib/d/Fooland/adm/
tmi2_fluffos_v2/lib/d/Fooland/data/
tmi2_fluffos_v2/lib/d/Fooland/data/attic/
tmi2_fluffos_v2/lib/d/Fooland/items/
tmi2_fluffos_v2/lib/d/TMI/
tmi2_fluffos_v2/lib/d/TMI/adm/
tmi2_fluffos_v2/lib/d/TMI/boards/
tmi2_fluffos_v2/lib/d/TMI/data/
tmi2_fluffos_v2/lib/d/TMI/rooms/
tmi2_fluffos_v2/lib/d/grid/
tmi2_fluffos_v2/lib/d/grid/adm/
tmi2_fluffos_v2/lib/d/grid/data/
tmi2_fluffos_v2/lib/d/std/
tmi2_fluffos_v2/lib/d/std/adm/
tmi2_fluffos_v2/lib/data/adm/
tmi2_fluffos_v2/lib/data/adm/daemons/
tmi2_fluffos_v2/lib/data/adm/daemons/doc_d/
tmi2_fluffos_v2/lib/data/adm/daemons/emoted/
tmi2_fluffos_v2/lib/data/adm/daemons/network/http/
tmi2_fluffos_v2/lib/data/adm/daemons/network/services/mail_q/
tmi2_fluffos_v2/lib/data/adm/daemons/network/smtp/
tmi2_fluffos_v2/lib/data/adm/daemons/news/archives/
tmi2_fluffos_v2/lib/data/attic/connection/
tmi2_fluffos_v2/lib/data/attic/user/
tmi2_fluffos_v2/lib/data/std/connection/b/
tmi2_fluffos_v2/lib/data/std/connection/l/
tmi2_fluffos_v2/lib/data/std/user/a/
tmi2_fluffos_v2/lib/data/std/user/b/
tmi2_fluffos_v2/lib/data/std/user/d/
tmi2_fluffos_v2/lib/data/std/user/f/
tmi2_fluffos_v2/lib/data/std/user/l/
tmi2_fluffos_v2/lib/data/std/user/x/
tmi2_fluffos_v2/lib/data/u/d/dm/working/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/smtp/
tmi2_fluffos_v2/lib/doc/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/interactive/
tmi2_fluffos_v2/lib/doc/driverdoc/concepts/
tmi2_fluffos_v2/lib/doc/driverdoc/driver/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/arrays/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/buffers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/compile/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/ed/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/filesystem/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/floats/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/functions/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/general/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/mappings/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/numbers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/parsing/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/constructs/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/preprocessor/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/types/
tmi2_fluffos_v2/lib/doc/driverdoc/platforms/
tmi2_fluffos_v2/lib/doc/mudlib/
tmi2_fluffos_v2/lib/ftp/
tmi2_fluffos_v2/lib/include/driver/
tmi2_fluffos_v2/lib/log/
tmi2_fluffos_v2/lib/log/driver/
tmi2_fluffos_v2/lib/obj/net/
tmi2_fluffos_v2/lib/obj/shells/
tmi2_fluffos_v2/lib/obj/tools/
tmi2_fluffos_v2/lib/std/adt/
tmi2_fluffos_v2/lib/std/board/
tmi2_fluffos_v2/lib/std/body/
tmi2_fluffos_v2/lib/std/fun/
tmi2_fluffos_v2/lib/std/living/
tmi2_fluffos_v2/lib/std/object/
tmi2_fluffos_v2/lib/std/shop/
tmi2_fluffos_v2/lib/std/socket/
tmi2_fluffos_v2/lib/std/user/
tmi2_fluffos_v2/lib/std/virtual/
tmi2_fluffos_v2/lib/student/
tmi2_fluffos_v2/lib/student/kalypso/
tmi2_fluffos_v2/lib/student/kalypso/armor/
tmi2_fluffos_v2/lib/student/kalypso/rooms/
tmi2_fluffos_v2/lib/student/kalypso/weapons/
tmi2_fluffos_v2/lib/u/l/leto/
tmi2_fluffos_v2/lib/u/l/leto/cmds/
tmi2_fluffos_v2/lib/www/errors/
tmi2_fluffos_v2/lib/www/gateways/
tmi2_fluffos_v2/lib/www/images/
tmi2_fluffos_v2/old/
tmi2_fluffos_v2/win32/
//	File	:  /cmds/xtra/_gate.c
//	Creator	:  Watcher@TMI-2   (01/93)
//
//	This is a wizard command which allows the moving of an
//	object, player, or monster from one location to another.
 
#include <mudlib.h>
 
inherit DAEMON ;
 
#define SYNTAX	"Syntax: gate [object] to [location | object]\n" + \
		"        gate [object] in [loc | obj] to [loc | obj]\n"
 
int cmd_gate(string str) {
   object prev, whatp, wherep;
   string prefix, loc, what, where, tmp_where;
   int ret;
 
   notify_fail(SYNTAX);
 
   //	Parse the input into proper command request
 
   if( !str || str == "")  return 0;
 
   if( sscanf(str, "%s in %s to %s", what, loc, where) != 3 &&
       sscanf(str, "%s to %s", what, where) != 2 &&
       sscanf(str, "%s %s", what, where) !=2)
	return 0;
 
   //  Locate the object to be moved
 
   if(loc && loc != "") {
	if(get_object(loc))   whatp = present(what, get_object(loc));
   }
   else  whatp = get_object(what);
 
   if(!whatp) {
   write("Gate: Could not locate \"" + what + "\"");
   if(loc)  write(" in \"" + loc + "\"");
   write(".\n");
   return 1; }
 
   //  See if you have permission to move the object
 
   if(wizardp(whatp) && whatp != this_player() &&
      !adminp(geteuid(this_player()))) {
   write("You do not have permission to move that user.\n");
   return 1; }
 
   //  Locate where to move the object
 
   wherep = get_object(where);
 
   //  Move living objects to environment, nonliving to actual object
 
   if(wherep && living(wherep) && living(whatp))
   	wherep = environment(wherep);
 
   if(!wherep) {
   tmp_where = resolv_path( "cwd", where );
   catch( call_other( tmp_where, "???" ) );	// Load the poss. location
   wherep = get_object( tmp_where );  
   }
 
   if(!wherep) {
   write("Gate: Could not locate \"" + where + "\".\n");
   return 1; }
 
   where = file_name(wherep);			// Get final location name
 
   //  Check to see if the object is already at the desired location
 
   if(wherep == environment(whatp)) {
   write("Gate: \"" + what + "\" is already at \"" + where + "\".\n");
   return 1; }
 
   //  Note pre-move location of the moving object
 
   prev = environment(whatp);
 
   //  Attempt to move the object to the new location
 
   ret = whatp->move(wherep);
 
   if(ret) {
   write("Gate: Could not move \"" + what + "\" to \"" + where + "\".\n");
   return 1; }
 
   //  Check to make sure object is still in existence.

   if(!whatp) {
   write("Gate: The object was moved and destroyed at the destination.\n");
   return 1; }
 
   //  Give reaction messages to object, caller, and surroundings
 
   if(living(whatp))  prefix = capitalize((string)whatp->query("name"));
   else  prefix = article(what) + " " + what;
 
   tell_room(prev, capitalize(prefix) + " suddenly shimmers " +
	     "and fades away.\n", ({ whatp }) );
   tell_object(whatp, "The air around you shimmers and you suddenly find" +
		      " yourself elsewhere.\n\n");
   tell_room(wherep, "The air around you shimmers and " + prefix +
		      " suddenly forms before you.\n", ({ whatp }) );
   if(interactive(whatp))   whatp->force_me("look");
 
   if(member_array(this_player(), ({ wherep, prev })) == -1 &&
      member_array(environment(this_player()), ({ wherep, prev })) == -1)
	write("Ok.\n");
 
return 1; }
 
int help() {
 
   write(SYNTAX + "\n" +
     "This command allows the user to move an object, monster, or player\n" +
     "to another location, living or nonliving object.  If the moved object\n"+
     "is living and the destination is living, it will be moved to the\n" +
     "destination's environment, while an non-living object will actually\n" +
     "be moved to that living object's inventory.  The gate command also\n" +
     "responds to such aliases as here, me, env, environment.\n");
 
return 1; }