NAME
doc/examples/players
DESCRIPTION
Interactive objects have a connection object attached to it.
These objects are typically called players.
EXAMPLES
#include <configuration.h>
/* To setup an interactive player
* write master::connect() like this:
*/
object connect()
{
object obj;
...
/* Establish a mud-wide default for a maximum command rate */
configure_interactive(this_object(),
IC_MAX_COMMANDS, 100);
/* In a screen-oriented editor, most of the printable
* characters (excluding answers to editor prompts
* 'j', 'n' and 'q') can be combined into strings.
*/
configure_interactive(this_object(),
IC_COMBINE_CHARSET_AS_STRING,
"abcdefghijklmoprstuvwxz0123456789"
"ABCDEFGHIJKLMOPRSTUVWXZ");
/* To disable any previous setting, just call: */
configure_interactive(this_object(),
IC_COMBINE_CHARSET_AS_STRING, "");
/* Upon return from the the function, the connection
* with its modified max_commands will be rebound
* from the master object to the returned object.
*/
return obj;
}
SEE ALSO
interactive(E), configure_interactive(E)