[DGD] Query_port()??

Lord Lerkista lerkista at planetatierra.net
Fri Aug 23 23:45:46 CEST 2002


On Friday, August 23, 2002, at 04:23  PM, Joshua P. Dady wrote:

>
> This really is quite simple.
>
> In the DGD distribution, doc/Introduction tells us that it calls a 
> function in the driver object when a connection is made which is 
> expected to return an object to be used as the connection object.
>    object telnet_connect(int port);
>    object binary_connect(int port);
>
> Even if you really want to use a 2.4.5-based mudlib, you shouldn't use 
> it as a reference implementation of about anything, least of all recent 
> DGD features.  You may not like the kernel mudlib, but you should learn 
> how it works anyway.  It gets updated with every release, so even if 
> you insist on not reading the documentation, you'll find the new 
> features handled in there.
>
>

Ok, my telnet_connect() in driver.c is now:

static object telnet_connect(int port_telnet){object user,player;
GLOBAL->set_this_player(0);
user=find_object(USER);
if(user==0){user=compile_object(USER);}
user=clone_object(user);
player=MASTER->connect();
user->set_player(player);
player->_F_user(user);
type="telnet";port=port_telnet;return user;}

I have also

driver.c:
int query_port(){return port;}

in simfun.c:
static int query_port(){rlimits(-1;-1){return 
::find_object(DRIVER)->query_port();}}

etc...

But query_port() always returns 0

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



More information about the DGD mailing list