[DGD]Newbie Question #2!

Erwin Harte harte at xs4all.nl
Thu Feb 15 00:10:34 CET 2001


On Wed, Feb 14, 2001 at 04:13:07PM -0500, Michel Racicot wrote:
> Hi there! (again!)
> 
>   If i want to add more commands to the users, do i have to add them in the
> receive_message function of /kernel/obj/user.c or is there a better way ?
> 
> (Like overriding the function ???)

Did you read dgd/mud/doc/kernel/overview that I quoted from or did you
unpack the DGD package and figured you'd start coding?

If you read it, perhaps you should reread this part:

  ---------------------------------------------------------------------------
  9. Extending the kernel library

  The kernel library was written in such a way that it can easily be extended
  without modifying any kernel objects.  The user manager and driver object
  contain hooks that allow routing of some calls to different objects.

> When you begin building, start with making a new user object.  This object
> should reside in /usr/System/obj.  The user object must inherit
> /kernel/lib/user.  Next, create a telnet connection manager which can be
  installed using "/kernel/sys/userd"->set_telnet_manager(obj).  Finally,
  create /usr/System/initd.c which handles system-specific initialization
  (for instance, the telnet connection manager must be installed from its
  create() function).
  ---------------------------------------------------------------------------

The first paragraph of the quoted bit is essential when dealing with
the kernel-lib, as just about everything has been set up so that you
can inherit and customize the functionality to your own liking.

If you haven't read the entire document yet, do yourself a favour and
take a few minutes to do so now. :-)

Regards,

Erwin.
-- 
Erwin Harte         :    `Don't mind Erwin, he gets crabby. :)'
harte at xs4all.nl     :       -- Par Winzell <zell at skotos.net>

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list