Elko: Server Mods

The Basic Mod Set: Server View

The following documents the standard mod set from the server's perspective. Note that what follows does not detail the message protocols that these mods obey. Consult the Basic Mod Set: Client View document for that information.

Note, however, that there are several mods that exist only on the server side, have no client presence, and are not directly visible to the client in any way.

Cartesian

The Cartesian mod provides the item to which it is attached with simple two-dimensional cartesian geometry. It also supports user manipulation of to the containership relation between objects. This mod may not be attached to users or contexts.

Representation

{
type:"cart",
left:INT,
top:INT,
width:INT,
height:INT
}

where:

Census

The Census mod allows a client to survey the number of users in a context, even if the client cannot see those users directly. It may be attached to any kind of object.

Representation

{ type:"census" }

Chat

The Chat mod enables multi-user text chat in a context. It is attached to a context, never to a user or item. It may be configured to individually allow or disallow the "say" or "push" messages, both to the context as a whole (public chat or push) and to individual users (private chat or push).

Representation

{
type:"chat",
allowchat:?BOOL,
allowprivate:?BOOL,
allowpush:?BOOL,
allowprivatepush:?BOOL
}

where:

ContextKey

The ContextKey mod enables entry to restricted entry contexts. It may be attached to a user or item, but doesn't make sense to be attached to a context. When a user attempts to enter a restricted context, the server checks to see if the user has a ContextKey mod attached or contains (at some level of nesting) an item with a ContextKey attached and that the ContextKey enables entry to the context.

Representation

{
type:"ctxkey",
contexts:[CTXREF_STR],
transferrable:?BOOL,
deletable:?BOOL,
expiration:?LONG
}

where:

Dictionary

The Dictionary mod associates a server-moderated name/value lookup table with the object to which it is attached. It may be attached to a context, user or item.

Representation

{ type:"dictionary", names:[STR], values:[STR], persist:?BOOL }

where:

Image

The Image mod associates an image with the object to which it is attached. It may be attached to any kind of object, but normally it will be attached to items. This mod is purely a data object; it has no behavior and no message protocol. It is up to the client application to make use of this data appropriately.

Representation

{ type:"image", img:STR, width:?INT, height:?INT }

where:

Invisible

The Invisible mod causes the item to which it is attached to be hidden from clients. That is, any such items will not be included in the contents of their containers when these contents are transmitted to clients. The contents of an invisible item are thus also effectively invisible, even if they do not themselves have this mod attached. This mod may only be attached to an item and never to a context or user.

Representation

{ type:"invisible" }

Note

The Note mod associates a block of editable text with the item to which it is attached. It must be attached to an item, not a context or user.

Representation

{ type:"note", text:STR, style:?STYLEDESC }

where:

NoteMaker

The NoteMaker mod provides a facility for creating new items with Notes attached. It is normally attached to the context, but this is not required.

Representation

{ type:"notemaker", styles:STYLEOPTIONSDESC }

where:

TalkOptions

The TalkOptions mod describes controls the style information associated with user utterances displayed as a result of "say" messages. This mod must be attached to a context, not to a user or item. It operates in conjunction with the Chat and TalkPrefs mods. This mod is purely a data object; it has no message protocol.

Representation

{ type:"talkoptions", styles:STYLEOPTIONSDESC }

where:

TalkPrefs

The TalkPrefs mod holds a user's current chat text display style settings. It operates in conjunction with the Chat and TalkOptions mods. It is always attached to a user. It always ephemeral, and so has no persistent representation.

Descriptor Objects

There are a couple of JSON objects that are used to carry standard bundles of information in the representations of certain mods and in some messages. These are not mods or messages themselves, but simply bundles of data.

Style Descriptor

The style descriptor contains information for the rendering of text.

Representation

{
type:"style",
color:?STR,
backgroundColor:?STR,
borderColor:?STR,
textStyle:?STR,
icon:?STR
}

where:

All elements are optional. Color names are standard HTML color names.

Style Options Descriptor

The style options descriptor contains a collection of text style information. It represents a range of permitted style values for use in preference setting and display.

Representation

{
type:"styleoptions",
colors:[STR],
backgroundColors:[STR],
borderColors:[STR],
textStyles:[STR],
icons:[STR],
iconWidth:?INT,
iconHeight:?INT
}

where:

All elements are optional.