[DGD] kernel library:solutions

Littlefield, Tyler tyler at tysdomain.com
Mon Apr 22 00:02:11 CEST 2013


hello all:
I had a couple questions. First, I'd like to start extending the user 
object. I've already created my obj/user.c (which basically looks like this:
#include <kernel/kernel.h>
#include <kernel/user.h>

inherit LIB_USER;
static object player;
nomask query_player()
{
return player;
}
nomask void set_player(object s)
{
player = s;
}

void create()
{
}

 From what I understand (does this have to be like this), the player 
object is separate with the user object just being something like the 
"connection" object. Is this how this is usually handled?
Second, I'm curious how to handle commands. right now it's a huge switch 
statement. I'd like to be able to have a file per command that a daemon 
can handle (maybe with access flags to determine who can run it. I can 
create a daemon since I have the code, but I'm curious how commands 
usually get loaded. Would you just iterate through the directory and 
clone objects, then add those to the command daemon?
Thanks,

-- 
Take care,
Ty
http://tds-solutions.net
The aspen project: a barebones light-weight mud engine:
http://code.google.com/p/aspenmud
He that will not reason is a bigot; he that cannot reason is a fool; he that dares not reason is a slave.




More information about the DGD mailing list