Table of Contents

Class: BaseCommandHandler mudlib/commands.py

The base commands common to most interactives. All players share these basic commands. Other command handlers can add additional commands for the purposes of coding or fishing or whatever.

Base Classes   
MudObject
Methods   
alias
ansi
ansiSet
ask
displayCommands
displayHelpTopic
displayIdleTime
emote
enterBriefMode
enterVerboseMode
fingerCommand
get
getUptime
glance
introduce
inventory
logBug
logIdea
look
put
quit
register
save
say
search
shout
stats
tell
unalias
who
  alias 
alias (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the alias command.

Valid syntaxes are alias, alias <shortcut>, and alias <shortcut> <command>. If the first syntax is given, this method will display a list of all aliases registered with this interactive. If the second syntax is given, this method will display the command associated with the given alias. If the third syntax is given, this method will add a new alias with the given shortcut and command (if an alias already exists with that shortcut, it will be overwritten).

  ansi 
ansi (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the ansi command.

Allows people to turn on and turn off ansi colors.

  ansiSet 
ansiSet (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the ansiset command.

Our mud is filled with various colors of things. Rather than hard-code most of the colors, we use ansi variables which then get replaced with the colors of the user's choice. This enables users to tag certain information with colors as they so choose enabling them to more quickly understand the information we're sending them.

Valid uses are ansiset, ansiset <var> and ansiset <var> <color>.

  ask 
ask (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the ask command.

This allows players to ask NPCs about certain things triggering a response if the NPC has one.

FIXME - um... this could probably be rewritten to support a better syntax

  displayCommands 
displayCommands (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the commands command.

Valid syntax: commands. This method dumps a list of all commands currently registered with the player, including active exits and temporary commands granted by items and what not. Probably not very useful other than for debugging.

  displayHelpTopic 
displayHelpTopic (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the help command.

Syntax: help, help topic/command, help section topic/command This gives players and coders access to the various help topics available. Help comes in two flavors: command help which covers a specific command and topic help which covers a topic.

  displayIdleTime 
displayIdleTime (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the idle command.

Valid syntax: idle <player>. This method first checks that the given player is online. If not, an error message is displayed. Otherwise, that player's idle time is queried and displayed to this player.

  emote 
emote (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the emote player command.

Valid syntax: emote <message>. This method displays the message to all interactives in the NPC's environment.

  enterBriefMode 
enterBriefMode (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the brief command.

Acceptable syntax is brief. This method puts the interactive into brief mode, meaning that the interactive will glance as it moves instead of looking.

  enterVerboseMode 
enterVerboseMode (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the verbose command.

Acceptable syntax is verbose. This method puts the interactive into verbose mode, meaning that the interactive will look as it moves instead of glancing. Verbose is the default mode.

  fingerCommand 
fingerCommand (
        self,
        actionString,
        arguments,
        rawInput,
        )

Implements the finger coder command.

Valid syntax: "finger <player>". Basic information on the given player will be displayed, as well as any additional finger information set by aspects of the game (such as guilds, quests, or occupations). If the player is a wizard, their .plan file will be displayed if it exists in their home directory.

  get 
get (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the get command.

Acceptable syntaxes are get &lt;item&gt; and get &lt;item&gt; from &lt;container&gt;. This method will, if possible, move the target item from its environment and into the player's inventory. It respects the IS_NOT_GETTABLE property, as well as possible failure of the move method (which could result, for example, from the target object failing a canLeaveEnvironment or canEnterEnvironment test).

  getUptime 
getUptime (
        self,
        actionString,
        argumnets,
        rawinput,
        )

Implements the uptime command.

Regular players can see how long the mud has been up and when the next reboot is likely to occur. Also shows some quick statistics on the mud.

  glance 
glance (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the glance command.

Acceptable syntax is glance. This method displays the short description of the interactive's current environment plus the environment's inventory and its exits.

  introduce 
introduce (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the introduce command.

Valid syntax is introduce myself, introduce myself to &lt;interactive&gt;, introduce &lt;interactive&gt;, and introduce &lt;interactive&gt; to &lt;interactive&gt;. This method will add this (or the source interactive) to the introduced list of the target interactive or, if no target interactive is specified, to all interactives in the source interactive's environment. An appropriate message is also displayed.

  inventory 
inventory (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the inventory command.

Valid syntax is inventory. This command display to the interactive a composite description of the items in its inventory. Note that it does not do a deep inventory, meaning that items within containers are not displayed.

  logBug 
logBug (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the bug command.

Allows players and coders to log bugs that they encounter into the central bug log for coders to see.

  logIdea 
logIdea (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the idea command.

Allows players and coders to log ideas to the idea log for coders to see.

  look 
look (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the look command.

Acceptable syntaxes are look, which displays the long description of the interactive's current environment, look at &lt;item&gt;, which displays the long description of the target item, and look at &lt;item&gt; in &lt;container&gt; which displays the long description of the item that resides within the target container.

  put 
put (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the put command.

Acceptable syntaxes are put &lt;item&gt; and put &lt;item&gt; into &lt;container&gt;. This method attempts to move the target item from the interactive's inventory into the specified container or, if no container is specified, into the interactive's environment. This method respects the IS_NOT_DROPPABLE property as well as possible failure of the move method (which could result, for example, from the target object failing a canLeaveEnvironment or canEnterEnvironment test).

Note that, if the target is an interactive, then the actionString must be give in order for this method to succeed.

  quit 
quit (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the quit command.

Valid syntax is quit. This method will log off the player, perform some cleanup, and destroy the object

  register 
register ( self,  manager )

  save 
save (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the save command.

Valid syntax is save. This method saves the current representation of the player to disk.

  say 
say (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the say command.

Valid syntax is say &lt;message&gt;. This command displays the message to all interactives in the interactive's environment.

  search 
search (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the search command.

Allows a player to search something for things that may not be readily apparent to the player. For instance, searching a wall for outlines of a secret hidden door.

  shout 
shout (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the shout command.

Syntax: shout &lt;message&gt; This method will write the message to everyone currently online.

FIXME: Eventually, this command should respect blocking of obnoxious players and various filters and what not.

  stats 
stats (
        self,
        actionString,
        arguments,
        rawInput,
        )

  tell 
tell (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the tell command.

Valid syntax is tell &lt;player&gt; &lt;message&gt;. This method writes the message to the target player.

  unalias 
unalias (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the unalias command.

Valid syntax is unalias &lt;shortcut&gt;. This method will remove the alias associated with the given shortcut.

  who 
who (
        self,
        actionString,
        arguments,
        rawinput,
        )

Implements the who command.

Valid syntax is who. This method displays a list of all players who are currently logged in.


Table of Contents

This document was automatically generated on Thu Jan 24 08:57:43 2002 by HappyDoc version 2.0