Table of Contents

Module: coder mudlib/coder.py

mudlib.coder holds the CoderCommands class which encapsulates all the coder commands. mudlib.coder also holds a series of helper functions for those coder commands and handling coders in general.

Imported modules   
import callout
import constants
import core
from formatter import *
import language
import mind
import mudtime
from org.bluesock.bluemud.driver import Driver
from org.bluesock.bluemud.lib import MudObject
import parser
import possessed
import shadow
import stdlib
import stdprops
import string
import sys
import utils
Functions   
get_home_dir
promote_to_coder
save_file
  get_home_dir 
get_home_dir ()

Determines the home dir for the given player. Figures out the home dir for this player based on the root home dir (/world/home/) and the player's name.

returns:

(string) the full home directory based on the mud root

  promote_to_coder 
promote_to_coder ( pl,  promotenotify=1 )

Takes in a Player object or shadow and then does the steps to promote the player to a coder. Also saves the adjusted player to disk so they don't have to go through this process again and builds their coding environment.

arguments:

pl
(player ob) This is the player to promote to coder status.
promotenotify=1
(int) 1 if yes, 0 if no as to whether to notify people in the room as to this promoted coders code-edness.

  save_file 
save_file ( editor,  args )

Saves a file to disk that a coder opened for editing. When nomacs and mpico are instantiated, this method is bound to them for saving the output of their file buffers. In this way, we can use the editors for editing things from mail messages to bulletin board entries to files and just bind different save_file methods to the editors.

This particular one saves files being edited by coders to disk. It really shouldn't be called on it's own outside of the editor context.

arguments:

editor
(editor ob instance) the editor holding the buffer we want to save
args
(list of arguments) (ignored)

Classes   
CoderCommands

This class encapsulates all the coder commands. Typically, these

CoderController

This is the coder controller. It's pretty bare, but it allows


Table of Contents

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