[DGD] LP 2.4.5 mudlib for DGD 1.4

Greg Lewis glewis at eyesbeyond.com
Wed Mar 24 06:07:44 CET 2010


On Sun, Mar 21, 2010 at 06:46:58PM +0100, Felix A. Croes wrote:
> "Felix A. Croes" <felix at dworkin.nl> wrote:
> 
> > http://ftp.dworkin.nl/dgd/lib/2.4.5-for-1.4.tgz
> 
> I forgot to mention that I applied the patches from Greg Lewis to get
> it to work again.  Thanks, Greg.

Thanks Felix!  Here are some minimal patches to get it working if one
compiles in the networking extensions.  Included inline since I don't
recall whether attachments are acceptable for the mailing list.

--- 2.4.5/dgd/sys/driver.c.orig	2010-03-21 10:39:41.000000000 -0700
+++ 2.4.5/dgd/sys/driver.c	2010-03-23 21:53:25.000000000 -0700
@@ -3,6 +3,10 @@
 # include <status.h>
 # include "/dgd/lib/privilege.h"
 
+#ifdef __NETWORK_EXTENSIONS__
+#define	TELNET_PORT	2000
+#endif
+
 object *usr;		/* user array just before a swapout */
 
 /*
@@ -50,6 +54,9 @@
 	}
     }
     send_message("Setting up ipc.\n");
+#ifdef __NETWORK_EXTENSIONS__
+    open_port("telnet", TELNET_PORT);
+#endif
 }
 
 /*
@@ -249,6 +256,16 @@
     return user;
 }
 
+#ifdef __NETWORK_EXTENSIONS__
+/*
+ * NAME:	connection()
+ * DESCRIPTION:	return a user object.
+ */
+object connection(string ipnumber, int port) {
+    return telnet_connect(port);
+}
+#endif
+
 /*
  * NAME:	runtime_error()
  * DESCRIPTION:	log a runtime error
--- lpmud.dgd.orig	2010-03-21 10:39:41.000000000 -0700
+++ lpmud.dgd	2010-03-23 22:04:26.000000000 -0700
@@ -3,6 +3,7 @@
 directory	= "/usr/local/mud/2.4.5";/* base directory (MUST be absolute) */
 users		= 40;			/* max # of users */
 editors		= 41;			/* max # of editor sessions */
+ports		= 16;			/* max number of open ports (for network extensions) */
 ed_tmpfile	= "../tmp/ed";		/* proto editor tmpfile */
 swap_file	= "../tmp/swap";	/* swap file */
 swap_size	= 20960;		/* # sectors in swap file */

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org



More information about the DGD mailing list