mux/src/command.cpp File Reference

#include "copyright.h"
#include "autoconf.h"
#include "config.h"
#include "externs.h"
#include "ansi.h"
#include "attrs.h"
#include "command.h"
#include "comsys.h"
#include "functions.h"
#include "mguests.h"
#include "powers.h"
#include "vattr.h"
#include "help.h"
#include "pcre.h"

Include dependency graph for command.cpp:

Go to the source code of this file.

Defines

#define SET_PREFIX_CMD(s)
#define coin_name(s)   (((s)==1) ? mudconf.one_coin : mudconf.many_coins)
#define LIST_ATTRIBUTES   1
#define LIST_COMMANDS   2
#define LIST_COSTS   3
#define LIST_FLAGS   4
#define LIST_FUNCTIONS   5
#define LIST_GLOBALS   6
#define LIST_ALLOCATOR   7
#define LIST_LOGGING   8
#define LIST_DF_FLAGS   9
#define LIST_PERMS   10
#define LIST_ATTRPERMS   11
#define LIST_OPTIONS   12
#define LIST_HASHSTATS   13
#define LIST_BUFTRACE   14
#define LIST_CONF_PERMS   15
#define LIST_SITEINFO   16
#define LIST_POWERS   17
#define LIST_SWITCHES   18
#define LIST_VATTRS   19
#define LIST_DB_STATS   20
#define LIST_PROCESS   21
#define LIST_BADNAMES   22
#define LIST_RESOURCES   23
#define LIST_GUESTS   24

Functions

void commands_no_arg_add (CMDENT_NO_ARG cmdent[])
void commands_one_arg_add (CMDENT_ONE_ARG cmdent[])
void commands_one_arg_cmdarg_add (CMDENT_ONE_ARG_CMDARG cmdent[])
void commands_two_arg_add (CMDENT_TWO_ARG cmdent[])
void commands_two_arg_argv_add (CMDENT_TWO_ARG_ARGV cmdent[])
void commands_two_arg_cmdarg_add (CMDENT_TWO_ARG_CMDARG cmdent[])
void commands_two_arg_argv_cmdarg_add (CMDENT_TWO_ARG_ARGV_CMDARG cmdent[])
void init_cmdtab (void)
void set_prefix_cmds ()
 Fills in the table of single-character prefix commands.
bool check_access (dbref player, int mask)
static bool process_hook (dbref executor, dbref thing, char *s_uselock, ATTR *hk_attr, bool save_flg)
static char * hook_name (char *pCommand, int key)
static void process_cmdent (CMDENT *cmdp, char *switchp, dbref executor, dbref caller, dbref enactor, bool interactive, char *arg, char *unp_command, char *cargs[], int ncargs)
static int cmdtest (dbref player, char *cmd)
static int zonecmdtest (dbref player, char *cmd)
static int higcheck (dbref executor, dbref caller, dbref enactor, CMDENT *cmdp, char *pCommand)
static void hook_fail (dbref executor, CMDENT *cmdp, char *pCommand)
char * process_command (dbref executor, dbref caller, dbref enactor, bool interactive, char *arg_command, char *args[], int nargs)
static void list_cmdtable (dbref player)
static void list_attrtable (dbref player)
static void list_cmdaccess (dbref player)
static void list_cmdswitches (dbref player)
static void list_attraccess (dbref player)
 CF_HAND (cf_access)
 CF_HAND (cf_acmd_access)
 CF_HAND (cf_attr_access)
 CF_HAND (cf_cmd_alias)
static void list_df_flags (dbref player)
static void list_costs (dbref player)
static void list_options (dbref player)
static void list_vattrs (dbref player, char *s_mask)
static int LeftJustifyString (char *field, int nWidth, const char *value)
static size_t RightJustifyNumber (char *field, size_t nWidth, INT64 value)
static void list_hashstat (dbref player, const char *tab_name, CHashTable *htab)
static void list_hashstats (dbref player)
static void list_db_stats (dbref player)
static void list_process (dbref player)
void do_list (dbref executor, dbref caller, dbref enactor, int extra, char *arg)
void do_break (dbref executor, dbref caller, dbref enactor, int key, char *arg1)
void do_icmd (dbref player, dbref cause, dbref enactor, int key, char *name, char *args[], int nargs)
void do_train (dbref executor, dbref caller, dbref enactor, int key, char *string)
void do_moniker (dbref executor, dbref caller, dbref enactor, int key, int nfargs, char *name, char *instr)
static void show_hook (char *bf, char *bfptr, int key)
static void hook_loop (dbref executor, CMDENT *cmdp, char *s_ptr, char *s_ptrbuff)
void do_hook (dbref executor, dbref caller, dbref enactor, int key, char *name)

Variables

static NAMETAB attrib_sw []
static NAMETAB boot_sw []
static NAMETAB cboot_sw []
static NAMETAB comtitle_sw []
static NAMETAB cemit_sw []
static NAMETAB clone_sw []
static NAMETAB clist_sw []
static NAMETAB cset_sw []
static NAMETAB dbck_sw []
static NAMETAB decomp_sw []
static NAMETAB destroy_sw []
static NAMETAB dig_sw []
static NAMETAB doing_sw []
static NAMETAB dolist_sw []
static NAMETAB drop_sw []
static NAMETAB dump_sw []
static NAMETAB emit_sw []
static NAMETAB enter_sw []
static NAMETAB examine_sw []
static NAMETAB femit_sw []
static NAMETAB fixdb_sw []
static NAMETAB flag_sw []
static NAMETAB fpose_sw []
static NAMETAB function_sw []
static NAMETAB get_sw []
static NAMETAB give_sw []
static NAMETAB goto_sw []
static NAMETAB halt_sw []
static NAMETAB hook_sw []
static NAMETAB icmd_sw []
static NAMETAB leave_sw []
static NAMETAB listmotd_sw []
NAMETAB lock_sw []
static NAMETAB look_sw []
static NAMETAB mail_sw []
static NAMETAB malias_sw []
static NAMETAB mark_sw []
static NAMETAB markall_sw []
static NAMETAB motd_sw []
static NAMETAB notify_sw []
static NAMETAB open_sw []
static NAMETAB page_sw []
static NAMETAB pemit_sw []
static NAMETAB pose_sw []
static NAMETAB ps_sw []
static NAMETAB quota_sw []
static NAMETAB say_sw []
static NAMETAB set_sw []
static NAMETAB stats_sw []
static NAMETAB sweep_sw []
static NAMETAB switch_sw []
static NAMETAB teleport_sw []
static NAMETAB timecheck_sw []
static NAMETAB toad_sw []
static NAMETAB trig_sw []
static NAMETAB wait_sw []
static NAMETAB wall_sw []
static NAMETAB warp_sw []
static CMDENT_NO_ARG command_table_no_arg []
static CMDENT_ONE_ARG command_table_one_arg []
static CMDENT_ONE_ARG_CMDARG command_table_one_arg_cmdarg []
static CMDENT_TWO_ARG command_table_two_arg []
static CMDENT_TWO_ARG_ARGV command_table_two_arg_argv []
static CMDENT_TWO_ARG_CMDARG command_table_two_arg_cmdarg []
static CMDENT_TWO_ARG_ARGV_CMDARG command_table_two_arg_argv_cmdarg []
static CMDENTprefix_cmds [256]
static CMDENTgoto_cmdp
NAMETAB access_nametab []
NAMETAB attraccess_nametab []
NAMETAB indiv_attraccess_nametab []
static const char * switchd []
static const char * examd []
static const char * ed []
NAMETAB list_names []


Define Documentation

#define coin_name (  )     (((s)==1) ? mudconf.one_coin : mudconf.many_coins)

Definition at line 3192 of file command.cpp.

Referenced by list_costs().

#define LIST_ALLOCATOR   7

Definition at line 3742 of file command.cpp.

Referenced by do_list().

#define LIST_ATTRIBUTES   1

Definition at line 3736 of file command.cpp.

Referenced by do_list().

#define LIST_ATTRPERMS   11

Definition at line 3746 of file command.cpp.

Referenced by do_list().

#define LIST_BADNAMES   22

Definition at line 3757 of file command.cpp.

Referenced by do_list().

#define LIST_BUFTRACE   14

Definition at line 3749 of file command.cpp.

Referenced by do_list().

#define LIST_COMMANDS   2

Definition at line 3737 of file command.cpp.

Referenced by do_list().

#define LIST_CONF_PERMS   15

Definition at line 3750 of file command.cpp.

Referenced by do_list().

#define LIST_COSTS   3

Definition at line 3738 of file command.cpp.

Referenced by do_list().

#define LIST_DB_STATS   20

Definition at line 3755 of file command.cpp.

Referenced by do_list().

#define LIST_DF_FLAGS   9

Definition at line 3744 of file command.cpp.

Referenced by do_list().

#define LIST_FLAGS   4

Definition at line 3739 of file command.cpp.

Referenced by do_list().

#define LIST_FUNCTIONS   5

Definition at line 3740 of file command.cpp.

Referenced by do_list().

#define LIST_GLOBALS   6

Definition at line 3741 of file command.cpp.

Referenced by do_list().

#define LIST_GUESTS   24

Definition at line 3759 of file command.cpp.

Referenced by do_list().

#define LIST_HASHSTATS   13

Definition at line 3748 of file command.cpp.

Referenced by do_list().

#define LIST_LOGGING   8

Definition at line 3743 of file command.cpp.

Referenced by do_list().

#define LIST_OPTIONS   12

Definition at line 3747 of file command.cpp.

Referenced by do_list().

#define LIST_PERMS   10

Definition at line 3745 of file command.cpp.

Referenced by do_list().

#define LIST_POWERS   17

Definition at line 3752 of file command.cpp.

Referenced by do_list().

#define LIST_PROCESS   21

Definition at line 3756 of file command.cpp.

Referenced by do_list().

#define LIST_RESOURCES   23

Definition at line 3758 of file command.cpp.

Referenced by do_list().

#define LIST_SITEINFO   16

Definition at line 3751 of file command.cpp.

Referenced by do_list().

#define LIST_SWITCHES   18

Definition at line 3753 of file command.cpp.

Referenced by do_list().

#define LIST_VATTRS   19

Definition at line 3754 of file command.cpp.

Referenced by do_list().

#define SET_PREFIX_CMD (  ) 

Value:

prefix_cmds[(unsigned char)(s)[0]] = \
        (CMDENT *) hashfindLEN((char *)(s), 1, &mudstate.command_htab)

Referenced by set_prefix_cmds().


Function Documentation

CF_HAND ( cf_cmd_alias   ) 

Definition at line 3064 of file command.cpp.

03065 {
03066     UNUSED_PARAMETER(pExtra);
03067     UNUSED_PARAMETER(nExtra);
03068 
03069     char *ap;
03070     CMDENT *cmdp, *cmd2;
03071     NAMETAB *nt;
03072 
03073     MUX_STRTOK_STATE tts;
03074     mux_strtok_src(&tts, str);
03075     mux_strtok_ctl(&tts, " \t=,");
03076     char *alias = mux_strtok_parse(&tts);
03077     char *orig = mux_strtok_parse(&tts);
03078 
03079     if (!orig)
03080     {
03081         // We only got one argument to @alias. Bad.
03082         //
03083         return -1;
03084     }
03085 
03086     for (ap = orig; *ap && (*ap != '/'); ap++) ;
03087     if (*ap == '/')
03088     {
03089         // Switch form of command aliasing: create an alias for
03090         // a command + a switch
03091         //
03092         *ap++ = '\0';
03093 
03094         // Look up the command
03095         //
03096         cmdp = (CMDENT *) hashfindLEN(orig, strlen(orig), (CHashTable *) vp);
03097         if (cmdp == NULL || cmdp->switches == NULL)
03098         {
03099             cf_log_notfound(player, cmd, "Command", orig);
03100             return -1;
03101         }
03102 
03103         // Look up the switch
03104         //
03105         nt = find_nametab_ent(player, (NAMETAB *) cmdp->switches, ap);
03106         if (!nt)
03107         {
03108             cf_log_notfound(player, cmd, "Switch", ap);
03109             return -1;
03110         }
03111 
03112         if (!hashfindLEN(alias, strlen(alias), (CHashTable *)vp))
03113         {
03114             // Create the new command table entry.
03115             //
03116             cmd2 = (CMDENT *)MEMALLOC(sizeof(CMDENT));
03117             ISOUTOFMEMORY(cmd2);
03118             cmd2->cmdname = StringClone(alias);
03119             cmd2->switches = cmdp->switches;
03120             cmd2->perms = cmdp->perms | nt->perm;
03121             cmd2->extra = (cmdp->extra | nt->flag) & ~SW_MULTIPLE;
03122             if (!(nt->flag & SW_MULTIPLE))
03123             {
03124                 cmd2->extra |= SW_GOT_UNIQUE;
03125             }
03126             cmd2->callseq = cmdp->callseq;
03127             cmd2->handler = cmdp->handler;
03128 
03129             hashaddLEN(cmd2->cmdname, strlen(cmd2->cmdname), cmd2, (CHashTable *) vp);
03130         }
03131     }
03132     else
03133     {
03134         // A normal (non-switch) alias
03135         //
03136         void *hp = hashfindLEN(orig, strlen(orig), (CHashTable *) vp);
03137         if (hp == NULL)
03138         {
03139             cf_log_notfound(player, cmd, "Entry", orig);
03140             return -1;
03141         }
03142         hashaddLEN(alias, strlen(alias), hp, (CHashTable *) vp);
03143     }
03144     return 0;
03145 }

CF_HAND ( cf_attr_access   ) 

Definition at line 3029 of file command.cpp.

03030 {
03031     UNUSED_PARAMETER(vp);
03032 
03033     ATTR *ap;
03034     char *sp;
03035 
03036     for (sp = str; *sp && !mux_isspace(*sp); sp++)
03037     {
03038         ; // Nothing
03039     }
03040     if (*sp)
03041     {
03042         *sp++ = '\0';
03043     }
03044     while (mux_isspace(*sp))
03045     {
03046         sp++;
03047     }
03048 
03049     ap = atr_str(str);
03050     if (ap)
03051     {
03052         return cf_modify_bits(&(ap->flags), sp, pExtra, nExtra, player, cmd);
03053     }
03054     else
03055     {
03056         cf_log_notfound(player, cmd, "Attribute", str);
03057         return -1;
03058     }
03059 }

CF_HAND ( cf_acmd_access   ) 

Definition at line 2994 of file command.cpp.

02995 {
02996     UNUSED_PARAMETER(vp);
02997 
02998     ATTR *ap;
02999 
03000     for (ap = attr; ap->name; ap++)
03001     {
03002         int nBuffer;
03003         bool bValid;
03004         char *buff = MakeCanonicalAttributeCommand(ap->name, &nBuffer, &bValid);
03005         if (!bValid)
03006         {
03007             continue;
03008         }
03009 
03010         CMDENT *cmdp = (CMDENT *)hashfindLEN(buff, nBuffer, &mudstate.command_htab);
03011         if (cmdp != NULL)
03012         {
03013             int save = cmdp->perms;
03014             int failure = cf_modify_bits(&(cmdp->perms), str, pExtra, nExtra,
03015                  player, cmd);
03016             if (failure != 0)
03017             {
03018                 cmdp->perms = save;
03019                 return -1;
03020             }
03021         }
03022     }
03023     return 0;
03024 }

CF_HAND ( cf_access   ) 

Definition at line 2938 of file command.cpp.

02939 {
02940     UNUSED_PARAMETER(vp);
02941 
02942     CMDENT *cmdp;
02943     char *ap;
02944     bool set_switch;
02945 
02946     for (ap = str; *ap && !mux_isspace(*ap) && (*ap != '/'); ap++) ;
02947     if (*ap == '/')
02948     {
02949         set_switch = true;
02950         *ap++ = '\0';
02951     }
02952     else
02953     {
02954         set_switch = false;
02955         if (*ap)
02956         {
02957             *ap++ = '\0';
02958         }
02959         while (mux_isspace(*ap))
02960         {
02961             ap++;
02962         }
02963     }
02964 
02965     cmdp = (CMDENT *)hashfindLEN(str, strlen(str), &mudstate.command_htab);
02966     if (cmdp != NULL)
02967     {
02968         if (set_switch)
02969         {
02970             return cf_ntab_access((int *)cmdp->switches, ap, pExtra, nExtra,
02971                                   player, cmd);
02972         }
02973         else
02974         {
02975             return cf_modify_bits(&(cmdp->perms), ap, pExtra, nExtra, player,
02976                                   cmd);
02977         }
02978     }
02979     else
02980     {
02981         if (!mux_stricmp(str, "home"))
02982         {
02983             return cf_modify_bits(&(mudconf.restrict_home), ap, pExtra,
02984                                   nExtra, player, cmd);
02985         }
02986         cf_log_notfound(player, cmd, "Command", str);
02987         return -1;
02988     }
02989 }

bool check_access ( dbref  player,
int  mask 
)

Definition at line 935 of file command.cpp.

References Announce, statedata::bReadingConfiguration, Builder, CA_ADMIN, CA_ANNOUNCE, CA_BUILDER, CA_CANTBE_MASK, CA_DISABLED, CA_GOD, CA_HEAD, CA_IMMORTAL, CA_MUSTBE_MASK, CA_NO_GUEST, CA_NO_HAVEN, CA_NO_ROBOT, CA_NO_SLAVE, CA_NO_SUSPECT, CA_NO_UNINS, CA_ROBOT, CA_STAFF, CA_STATIC, CA_UNINS, CA_WIZARD, God, Guest, Head, Immortal, mudstate, Player_haven, Robot, Slave, Staff, Suspect, Uninspected, Wizard, and WizRoy.

Referenced by cf_display(), cf_list(), cf_set(), check_command(), decompile_flags(), display_nametab(), do_decomp(), find_nametab_ent(), interp_nametab(), list_cf_access(), list_cmdaccess(), list_cmdswitches(), list_cmdtable(), list_functable(), listset_nametab(), mux_exec(), process_cmdent(), process_command(), and search_nametab().

00936 {
00937     if (mask & (CA_DISABLED|CA_STATIC))
00938     {
00939         return false;
00940     }
00941     if (  God(player)
00942        || mudstate.bReadingConfiguration)
00943     {
00944         return true;
00945     }
00946 
00947     if (mask & CA_MUSTBE_MASK)
00948     {
00949         // Since CA_GOD by itself is a frequent case, for the sake of
00950         // performance, we test CA_GOD specifically. If CA_GOD were ever
00951         // combined with anything, it would be passed through to the general
00952         // case.
00953         //
00954         if ((mask & CA_MUSTBE_MASK) == CA_GOD)
00955         {
00956             return false;
00957         }
00958 
00959         // Since God(player) is always false here, CA_GOD is still handled by
00960         // the following code even though it doesn't appear in any of the
00961         // cases explicitly.  CA_WIZARD by itself is also a common case, but
00962         // since we have have a bit (mask & CA_MUSTBE_MASK), and since that
00963         // bit is not a lone CA_GOD bit (handled above), and since CA_WIZARD
00964         // it tested first below, it doesn't make sense to test CA_WIZARD
00965         // as a special case.
00966         //
00967         if (!(  ((mask & CA_WIZARD)   && Wizard(player))
00968              || ((mask & CA_ADMIN)    && WizRoy(player))
00969              || ((mask & CA_BUILDER)  && Builder(player))
00970              || ((mask & CA_STAFF)    && Staff(player))
00971              || ((mask & CA_HEAD)     && Head(player))
00972              || ((mask & CA_ANNOUNCE) && Announce(player))
00973              || ((mask & CA_IMMORTAL) && Immortal(player))
00974              || ((mask & CA_UNINS)    && Uninspected(player))
00975              || ((mask & CA_ROBOT)    && Robot(player))))
00976         {
00977             return false;
00978         }
00979     }
00980 
00981     // Check for forbidden flags.
00982     //
00983     if (  (mask & CA_CANTBE_MASK)
00984        && !Wizard(player))
00985     {
00986         if (  ((mask & CA_NO_HAVEN)   && Player_haven(player))
00987            || ((mask & CA_NO_ROBOT)   && Robot(player))
00988            || ((mask & CA_NO_SLAVE)   && Slave(player))
00989            || ((mask & CA_NO_SUSPECT) && Suspect(player))
00990            || ((mask & CA_NO_GUEST)   && Guest(player))
00991            || ((mask & CA_NO_UNINS)   && Uninspected(player)))
00992         {
00993             return false;
00994         }
00995     }
00996     return true;
00997 }

static int cmdtest ( dbref  player,
char *  cmd 
) [static]

Definition at line 1529 of file command.cpp.

References A_CMDCHECK, atr_get, free_lbuf, and mux_isspace.

Referenced by process_command(), and zonecmdtest().

01530 {
01531     char *buff1, *pt1, *pt2;
01532     dbref aowner;
01533     int aflags, rval;
01534 
01535     rval = 0;
01536     buff1 = atr_get(player, A_CMDCHECK, &aowner, &aflags);
01537     pt1 = buff1;
01538     while (pt1 && *pt1)
01539     {
01540         pt2 = strchr(pt1, ':');
01541         if (!pt2 || (pt2 == pt1))
01542             break;
01543         if (!strncmp(pt2+1, cmd, strlen(cmd)))
01544         {
01545             if (*(pt2-1) == '1')
01546                 rval = 1;
01547             else
01548                 rval = 2;
01549             break;
01550         }
01551         pt1 = strchr(pt2+1,' ');
01552         if (pt1 && *pt1)
01553         {
01554             while (mux_isspace(*pt1))
01555             {
01556                 pt1++;
01557             }
01558         }
01559     }
01560     free_lbuf(buff1);
01561     return rval;
01562 }

void commands_no_arg_add ( CMDENT_NO_ARG  cmdent[]  ) 

Definition at line 753 of file command.cpp.

References CMDENT_NO_ARG::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00754 {
00755     CMDENT_NO_ARG *cp0a;
00756     for (cp0a = cmdent; cp0a->cmdname; cp0a++)
00757     {
00758         if (!hashfindLEN(cp0a->cmdname, strlen(cp0a->cmdname),
00759                          &mudstate.command_htab))
00760         {
00761             hashaddLEN(cp0a->cmdname, strlen(cp0a->cmdname), cp0a,
00762                        &mudstate.command_htab);
00763         }
00764     }
00765 }

void commands_one_arg_add ( CMDENT_ONE_ARG  cmdent[]  ) 

Definition at line 767 of file command.cpp.

References CMDENT_ONE_ARG::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00768 {
00769     CMDENT_ONE_ARG *cp1a;
00770     for (cp1a = cmdent; cp1a->cmdname; cp1a++)
00771     {
00772         if (!hashfindLEN(cp1a->cmdname, strlen(cp1a->cmdname),
00773                         &mudstate.command_htab))
00774         {
00775             hashaddLEN(cp1a->cmdname, strlen(cp1a->cmdname), cp1a,
00776                        &mudstate.command_htab);
00777         }
00778     }
00779 }

void commands_one_arg_cmdarg_add ( CMDENT_ONE_ARG_CMDARG  cmdent[]  ) 

Definition at line 781 of file command.cpp.

References CMDENT_ONE_ARG_CMDARG::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00782 {
00783     CMDENT_ONE_ARG_CMDARG *cp1ac;
00784     for (cp1ac = cmdent; cp1ac->cmdname; cp1ac++)
00785     {
00786         if (!hashfindLEN(cp1ac->cmdname, strlen(cp1ac->cmdname),
00787                          &mudstate.command_htab))
00788         {
00789             hashaddLEN(cp1ac->cmdname, strlen(cp1ac->cmdname), cp1ac,
00790                        &mudstate.command_htab);
00791         }
00792     }
00793 }

void commands_two_arg_add ( CMDENT_TWO_ARG  cmdent[]  ) 

Definition at line 795 of file command.cpp.

References CMDENT_TWO_ARG::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00796 {
00797     CMDENT_TWO_ARG *cp2a;
00798     for (cp2a = cmdent; cp2a->cmdname; cp2a++)
00799     {
00800         if (!hashfindLEN(cp2a->cmdname, strlen(cp2a->cmdname),
00801                          &mudstate.command_htab))
00802         {
00803             hashaddLEN(cp2a->cmdname, strlen(cp2a->cmdname), cp2a,
00804                        &mudstate.command_htab);
00805         }
00806     }
00807 }

void commands_two_arg_argv_add ( CMDENT_TWO_ARG_ARGV  cmdent[]  ) 

Definition at line 809 of file command.cpp.

References CMDENT_TWO_ARG_ARGV::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00810 {
00811     CMDENT_TWO_ARG_ARGV *cp2aa;
00812     for (cp2aa = cmdent; cp2aa->cmdname; cp2aa++)
00813     {
00814         if (!hashfindLEN(cp2aa->cmdname, strlen(cp2aa->cmdname),
00815                          &mudstate.command_htab))
00816         {
00817             hashaddLEN(cp2aa->cmdname, strlen(cp2aa->cmdname), cp2aa,
00818                        &mudstate.command_htab);
00819         }
00820     }
00821 }

void commands_two_arg_argv_cmdarg_add ( CMDENT_TWO_ARG_ARGV_CMDARG  cmdent[]  ) 

Definition at line 837 of file command.cpp.

References CMDENT_TWO_ARG_ARGV_CMDARG::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00838 {
00839     CMDENT_TWO_ARG_ARGV_CMDARG  *cp2aac;
00840     for (cp2aac = cmdent; cp2aac->cmdname; cp2aac++)
00841     {
00842         if (!hashfindLEN(cp2aac->cmdname, strlen(cp2aac->cmdname),
00843                          &mudstate.command_htab))
00844         {
00845             hashaddLEN(cp2aac->cmdname, strlen(cp2aac->cmdname), cp2aac,
00846                        &mudstate.command_htab);
00847         }
00848     }
00849 }

void commands_two_arg_cmdarg_add ( CMDENT_TWO_ARG_CMDARG  cmdent[]  ) 

Definition at line 823 of file command.cpp.

References CMDENT_TWO_ARG_CMDARG::cmdname, statedata::command_htab, hashaddLEN(), hashfindLEN(), and mudstate.

Referenced by local_startup().

00824 {
00825     CMDENT_TWO_ARG_CMDARG  *cp2ac;
00826     for (cp2ac = cmdent; cp2ac->cmdname; cp2ac++)
00827     {
00828         if (!hashfindLEN(cp2ac->cmdname, strlen(cp2ac->cmdname),
00829                          &mudstate.command_htab))
00830         {
00831             hashaddLEN(cp2ac->cmdname, strlen(cp2ac->cmdname), cp2ac,
00832                        &mudstate.command_htab);
00833         }
00834     }
00835 }

void do_break ( dbref  executor,
dbref  caller,
dbref  enactor,
int  key,
char *  arg1 
)

Definition at line 3909 of file command.cpp.

References break_called, UNUSED_PARAMETER, and xlate().

03910 {
03911     UNUSED_PARAMETER(executor);
03912     UNUSED_PARAMETER(caller);
03913     UNUSED_PARAMETER(enactor);
03914     UNUSED_PARAMETER(key);
03915 
03916     break_called = xlate(arg1);
03917 }

void do_hook ( dbref  executor,
dbref  caller,
dbref  enactor,
int  key,
char *  name