POO Library
$user configuration commands
Here is a set of short commands that users can use to configure their
POO character -- things that fall under the rubric of "preferences"
in the standard help database.
@setprompt
@newfunc setprompt(self,prompt) on $user
if prompt == 'default':
user._prompt = 'poo>'
print "Prompt reset to the default."
else:
user._prompt = prompt
print "Prompt set."
.x
@set $user.setprompt.desc = "set prompt"
@setperm $user.setprompt = rc
@cmd $user.@setprompt calls setprompt(%1)
@markup
@newfunc markup(self,kind) on $user
kind = string.lower(kind)
if kind == "default":
del self.marksub
elif kind == "vt100":
self.marksub = marksub.vt100()
elif kind == "plain":
self.marksub = marksub.plain()
elif kind == "html":
self.marksub = marksub.html()
elif kind == "show" or kind == "showcodes":
self.marksub = marksub.showcodes()
else:
print "Unknown markup type. Use default, vt100, plain, html, or show."
return
print "Markup type set to", kind+"."
.x
@set $user.markup.desc = "set standard markup types"
@setperm $user.markup = rc
@cmd $user.@markup calls markup(%1)
@linelen
@newfunc at_linelen(self,len) on $user
if length < 0: length = 0
if length == self.parents[0].linelen:
del self.linelen
else:
self.linelen = length
if length: print "Lines now wrap at", length, "characters."
else: print "Lines are no longer wrapped."
.x
@set $user.linelen.desc = "set max. line length"
@setperm $user.linelen = rc
@cmd $user.@linelen calls at_linelen(%1)
@sethome
@newfunc sethome(self) on $user
if self.location.owner == self or self.location.public_home:
self.home = self.location
print "This is now your home."
else:
print "This room belongs to " + self.location.owner.name \
+ ", and is not a public home."
.x
@set $user.sethome.desc = "set home to current room"
@setperm $user.sethome = rc
@cmd $user.@sethome calls sethome()
Help Files
The text below can be copied directly into the help editor.
@setprompt
@setprompt
This command sets the prompt that appears at the start of every line
when the POO server is ready for your input. "prompt" may be any
string, or empty quotes, but it is recommended that you include
> in your prompt to turn off stray text styling. To restore
the default prompt, use "@setprompt default".
Example:
@setprompt >
This example sets no visible prompt, but includes > to restore
normal text styling.
.
n
@markup
@markup
This command is used to change the way you received styled (marked up)
text. Some POO output contains markup tags which indicate bold text
(etc.) If you enter the command "@markup plain", these tags will
simply be stripped from the output before you see it. "@markup vt100"
will convert the tags to VT100 escape sequences. "@markup html"
converts the tags to HTML tags, which can be interpreted by some MUD
clients. "@markup show" does no translation at all, allowing you to
see the markup tags in their native POO form. This is very convenient
when examining or copying descriptions for future reference.
.
n
@linelen
@linelen
This command sets your line length, i.e., how many characters fit on
a line for your terminal or client program. If line length is
unlimited (because your client automatically wraps words, for example),
use "@linelen 0". The default is "@linelen 80", i.e, 80-character
lines.
.
n
@sethome
@sethome
@sethome declares that the room you're currently in should hereafter
be considered your home room. You can return to this room at any
time with the @home command.
.
n
preferences
Various commands are available to configure your character, and your
interface with the POO system.
@password @markup @linelen
@sethome @setprompt
.
y
http://www.strout.net/python/poo/lib/config.html
Last Updated:
6/28/97
. . . . . . Joe Strout