lima-1.0b5/
lima-1.0b5/driver/
lima-1.0b5/driver/ChangeLog.old/
lima-1.0b5/driver/Win32/
lima-1.0b5/driver/compat/
lima-1.0b5/driver/include/
lima-1.0b5/driver/testsuite/
lima-1.0b5/driver/testsuite/clone/
lima-1.0b5/driver/testsuite/command/
lima-1.0b5/driver/testsuite/data/
lima-1.0b5/driver/testsuite/etc/
lima-1.0b5/driver/testsuite/include/
lima-1.0b5/driver/testsuite/inherit/
lima-1.0b5/driver/testsuite/inherit/master/
lima-1.0b5/driver/testsuite/log/
lima-1.0b5/driver/testsuite/single/
lima-1.0b5/driver/testsuite/single/tests/compiler/
lima-1.0b5/driver/testsuite/single/tests/efuns/
lima-1.0b5/driver/testsuite/single/tests/operators/
lima-1.0b5/driver/testsuite/u/
lima-1.0b5/driver/tmp/
lima-1.0b5/etc/
lima-1.0b5/lib/WWW/help/
lima-1.0b5/lib/cmds/
lima-1.0b5/lib/cmds/create/
lima-1.0b5/lib/cmds/player/attic/
lima-1.0b5/lib/contrib/bboard/
lima-1.0b5/lib/contrib/boards/
lima-1.0b5/lib/contrib/marriage/
lima-1.0b5/lib/contrib/roommaker/
lima-1.0b5/lib/contrib/transient_effect/
lima-1.0b5/lib/daemons/channel/
lima-1.0b5/lib/daemons/imud/
lima-1.0b5/lib/data/
lima-1.0b5/lib/data/config/
lima-1.0b5/lib/data/links/
lima-1.0b5/lib/data/news/
lima-1.0b5/lib/data/players/
lima-1.0b5/lib/data/secure/
lima-1.0b5/lib/domains/
lima-1.0b5/lib/domains/std/2.4.5/maze1/
lima-1.0b5/lib/domains/std/2.4.5/npc/
lima-1.0b5/lib/domains/std/2.4.5/post_dir/
lima-1.0b5/lib/domains/std/2.4.5/sub/
lima-1.0b5/lib/domains/std/camera/
lima-1.0b5/lib/domains/std/config/
lima-1.0b5/lib/domains/std/cult/
lima-1.0b5/lib/domains/std/effects/
lima-1.0b5/lib/domains/std/misc/
lima-1.0b5/lib/domains/std/monsters/
lima-1.0b5/lib/domains/std/recorder/
lima-1.0b5/lib/domains/std/rooms/
lima-1.0b5/lib/domains/std/rooms/beach/
lima-1.0b5/lib/domains/std/rooms/labyrinth/
lima-1.0b5/lib/domains/std/school/
lima-1.0b5/lib/domains/std/school/O/
lima-1.0b5/lib/domains/std/spells/
lima-1.0b5/lib/domains/std/spells/stock-mage/
lima-1.0b5/lib/domains/std/spells/stock-priest/
lima-1.0b5/lib/help/
lima-1.0b5/lib/help/admin/
lima-1.0b5/lib/help/hints/General_Questions/
lima-1.0b5/lib/help/hints/Pirate_Quest/
lima-1.0b5/lib/help/player/
lima-1.0b5/lib/help/player/bin/
lima-1.0b5/lib/help/player/quests/
lima-1.0b5/lib/help/wizard/
lima-1.0b5/lib/help/wizard/coding/guilds/
lima-1.0b5/lib/help/wizard/coding/rooms/
lima-1.0b5/lib/help/wizard/lib/daemons/
lima-1.0b5/lib/help/wizard/lib/lfun/
lima-1.0b5/lib/help/wizard/lib/std/
lima-1.0b5/lib/help/wizard/mudos_doc/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/interactive/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/parsing/
lima-1.0b5/lib/help/wizard/mudos_doc/concepts/
lima-1.0b5/lib/help/wizard/mudos_doc/driver/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/arrays/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/buffers/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/compile/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/filesystem/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/floats/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/functions/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/general/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/mappings/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/mixed/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/numbers/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/parsing/
lima-1.0b5/lib/help/wizard/mudos_doc/lpc/constructs/
lima-1.0b5/lib/help/wizard/mudos_doc/lpc/types/
lima-1.0b5/lib/include/driver/
lima-1.0b5/lib/log/
lima-1.0b5/lib/obj/admtool/
lima-1.0b5/lib/obj/admtool/internal/
lima-1.0b5/lib/obj/admtool/mudinfo/
lima-1.0b5/lib/obj/admtool/secure/
lima-1.0b5/lib/obj/secure/
lima-1.0b5/lib/obj/secure/cmd/
lima-1.0b5/lib/obj/secure/mailers/
lima-1.0b5/lib/obj/secure/shell/
lima-1.0b5/lib/obj/secure/shell/classes/
lima-1.0b5/lib/obj/tasktool/
lima-1.0b5/lib/obj/tasktool/internal/
lima-1.0b5/lib/open/
lima-1.0b5/lib/secure/
lima-1.0b5/lib/secure/cgi/
lima-1.0b5/lib/secure/modules/
lima-1.0b5/lib/secure/simul_efun/
lima-1.0b5/lib/std/adversary/
lima-1.0b5/lib/std/adversary/advancement/
lima-1.0b5/lib/std/adversary/armor/
lima-1.0b5/lib/std/adversary/blows/
lima-1.0b5/lib/std/adversary/death/
lima-1.0b5/lib/std/adversary/formula/
lima-1.0b5/lib/std/adversary/health/
lima-1.0b5/lib/std/adversary/pulse/
lima-1.0b5/lib/std/adversary/wield/
lima-1.0b5/lib/std/classes/event_info/
lima-1.0b5/lib/std/container/
lima-1.0b5/lib/std/living/
lima-1.0b5/lib/std/modules/contrib/
lima-1.0b5/lib/std/patterns/
lima-1.0b5/lib/std/race/
lima-1.0b5/lib/std/race/restricted/
lima-1.0b5/lib/std/room/
lima-1.0b5/lib/tmp/
lima-1.0b5/lib/trans/
lima-1.0b5/lib/trans/admincmds/
lima-1.0b5/lib/trans/obj/
lima-1.0b5/lib/wiz/
/* Do not remove the headers from this file! see /USAGE for more info. */

#include <playerflags.h>
#include <commands.h>

object this_body();
int check_privilege(mixed priv);
int adminp(mixed m);
varargs void tell(object, string);

void write(string str) {
    if (this_user())
	tell(this_user(), str);
    else {
	if (str[<1] == '\n')
	    str = str[0..<2];
	debug_message("]" + str);
    }
}

//:FUNCTION ed
//The ed() efun is not used by the LIMA mudlib, as we use the new ed
//functionality.  See ed_session.c
nomask varargs void ed(string file, mixed func)
{
    error("ed() not available\n");
}

//:FUNCTION exec
//The exec efun is never used by the LIMA mudlib, since only bodies are
//reconnected.
nomask int exec(object target, object src)
{
    error("exec() not available\n");
}

//:FUNCTION debug_info
//The debug_info efun is temporarily denied, until the driver is altered
//to use the valid_bind() apply.
nomask string debug_info(int operation, object ob)
{
    if ( !check_privilege(1) )
	error("debug_info() not available right now\n");
    return efun::debug_info(operation, ob);
}

//:FUNCTION input_to
//input_to should not be used; the stackable input system should be used
//instead.  See the modal_push() and modal_func() routines.
nomask varargs int input_to()
{
    error("input_to() should not be used.  Use modal_push()/modal_func()\n");
}

//:FUNCTION find_player
//find_body() and find_user() are used to find the body and connection objects,
//respectively.
nomask object find_player(string str)
{
    error("find_player() is obsolete.  Use find_body() instead.\n");
}

//:FUNCTION this_player
//this_body() and this_user() are used to find the body and connection objects,
//respectively.
nomask object this_player(string str)
{
    error("this_player() is obsolete.  Use this_body() or this_user() instead.\n");
}

//:FUNCTION destruct
//The destruct simul_efun guarantees that an object will always have remove()
//called in it if it is destructed by another object.  destruct() with no
//arguments destructs this_object WITHOUT calling remove, which is the
//correct way to destruct an object from within a remove() function.
//destruct() can also be passed an optional second arg, which is passed
//to the remove() routine.  The update command passes 1 as the second
//argument to indicate that a new copy will be reloaded immediately.
nomask varargs void destruct(object ob, mixed arg) {
    if (!nullp(ob)) { // were we called with an arg ?
	if (ob)
	    catch(ob->remove(arg));
    } else {
	// self destruct; presumably from non_object or some similar base
	ob = previous_object();
    }
    if (ob)
	efun::destruct(ob);
}

//:FUNCTION shutdown
//The shutdown simul exists to prevent anything less than priv 1 from shutting
//down the mud.
nomask void shutdown()
{
    if ( check_privilege(1) )
	efun::shutdown();
    else
	error("Insufficient privilege to shut down.\n");
}

//:FUNCTION query_snoop
//The query_snoop efun makes no sense in the context of our snoop system.
nomask object query_snoop(object ob)
{
  error("Lima doesn't use regular snoop.\n");
}

//:FUNCTION query_snooping
//The query_snooping efun makes no sense in the context of our snoop system.
nomask object query_snooping(object ob)
{
  error("Lima doesn't use regular snoop.\n");
}

void snoop(object snooper, object snoopee)
{
  if(previous_object() == find_object(SNOOP_D))
    efun::snoop(snooper, snoopee);
  else
    error("Only SNOOP_D may call snoop.\n");
}

varargs void tell_object()
{
    error("Use tell() instead.\n");
}

varargs void tell_room()
{
    error("Use tell_environment() or tell_from_inside() instead.\n");
}

varargs void shout()
{
    error("Use tell(users() - ({ this_user() }), msg) instead.\n");
}


//:FUNCTION say
//The say() efun is not used by the LIMA mudlib, in favor of the extensive
//messaging system in the body.  Consider using this_body()->other_action()
//instead of say().
void say(string m)
{
    error("say() not available. Consider using this_body()->other_action()\n");
}

void printf(string format, array rest...) {
    if (this_user())
	tell(this_user(), sprintf(format, rest...));
    else
	debug_message("]" + sprintf(format, rest...));
}


/*
varargs int memory_info(object ob)
{
    error("memory_info() is disabled for now, pending a bugfix.\n");
}
*/