Skip to content
Simon Marsh's EW-too code circa September 1994
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
doc
files
junk
logs
src
CREDITS
LEGALISE
README

README

A man lived on his ship. He breathed her air, ate and drank from her
stores. Her bulkheads solid around him kept the uncaring vacuum outside
where it belonged and her driving engines bent the very curvature of space
to take him wherever he wanted to go.

But then he had to land ...

Suddenly all that breathing and eating became a life support replenishment
invoice. Those protecting bulkheads hid structural support members that had
to be inspected and recertified by a licensed and commensurately expensive
naval surveyor. Engines became fuel costs and a ten-thousand-hour service
charge. Then there were berth fees, entry fees, value-added tax on cargo
transactions, customs "courtesy" fees, outright bribes to the longshore-
men's unions - and Moses Callahan wound up sitting in the deepest corner of
the Hybreasil import bar complex, wondering whether to have another beer or 
have his good uniform cleaned and pressed before heading outport to try to
unearth a cargo Celtic Crescent or Wstern Galactic might have overlooked.

He ordered the beer, ignoring the cashplate's flickering scarlet reproach.
The hovering waiter ejected his cashplate onto the table and floated off
for his order, highlighted by the flickering glow of the alternate 
environment lounge -- "A touch of Elsewhere" the airlock announced --
where shadowed figures moved through a chemical fog Moses would never have
called air.

				   The Shattered Stars, Richard S. McEnroe



This is the EW-too source code, finally released for you to download
and promptly rm -r.

So what should you expect from this release ?

Not a lot is the answer. The code is provided simply because people asked 
for it. 

This code is here AS IS. I take no responsability for it and will not be
applying any fixes for it, so don't come pestering me when it doesn't work.
(There are many things wrong with the code, I know, but I aint gonna be
doing anything about it, ok ?) If there is a bug, fix it yourself, and 
make the fixes public so that other people can benefit.

Ok, so what is here ?

	LEGALISE	-	Read this to see how you can use this code.
	CREDITS		-	Who made this code possible.
	README		- 	This file
	bin		- 	Contains binaries and shell scripts
	doc		-	documenation and help files 
				(what little there is)
	files		-	Database files needed at runtime.
	junk		-	A directory in which to stuff rubbish.
				(particularly .o files, if you are short
				of space, link this directory to somwhere
				in /tmp)
	logs		-	Files generated by the program
	src		- 	The program source.


Getting it to work ...

Don't even think of trying to get something useable working unless you
are a competant C programmer with plenty of time to spare, and the will
to go hacking the code. 
This isn't some code that is going to work straight out the box, if you
really want to use it, you are encouraged to modify and change it so that
you end up with your own code, that is different, is better, and has its
own unique style.

The code was written using GCC on SunOS 4, and little has been done to
aid portability. It should be relatively easy to get working on most 
UNIX boxes (though I wouldn't like to try on dynix/ptx or a DEC Alpha). I
know for a fact the code will work on Ultrix, Prime/SGI mips machines, 
Solaris, and Linux given some minor modifications. However, if you want
to get the code running on anything other than SunOS, then good luck, 
you will have some work to do ...

Be aware that the code was intended for my use only, it has little (useful)
commenting, and has been munged by more than one person. In other words
its a mess, you will need to be very patient in order to use it.

The code was designed to handle ~1000 residents with ~100 people connected
simultaneously. With these numbers you can expect it to run in less than
1 meg of memory, take up 0% CPU on most machines and should stay up for 
weeks. As it happens, the code has run over 6000 residents, ~11000 rooms 
and with greater than 220 people on simultaneously. Its a big bloated beast
with this sort of use (it runs with ~7meg of memory minimum and 20meg of disk
including 3 days backups), but it works, and still takes up minimal CPU (< 3%
on a SPARC 1 most of the time).

Some documentation does exist in the 'doc' directory, but its probably
out of date. Be prepared to trawl through all the documentation and
change it to suit your own purposes.

BEWARE of the stack. Unfortunatly, the stack is used to construct file
saves before throwing out to disk. This means it must be configured larger
than the largest saved file. This is typically the 's' player file. (to give
you some numbers, you can expect ~400k for the s player files when running 
with 6000 residents, virtually all the other player files are half this size).
If you suddenly find the program crashing for inexplicable reasons (on SunOS
systems, it tends to crash in the localtime() system call in parse.c *boggle*)
then the first thing to do is check that the stack is large enough.


Places to look in order to get it to build.

	src/Makefile	-	The makefile that builds it all
	src/config.h	-	general configurables
	src/glue.c	-	There is lots of platform specific stuff
				here, particularly to do with resource 
				limits.
	src/admin.c	-	You may have to comment out the malloc
				information code here.
	src/plists.c	-	Line 883 contains a name that will have
				hard coded administrator privs. 

The first ever time you boot, you will get a whole load of missing file
errors. These files will be auto generated by the server. In case you
are wondering, you should see something like this ...

22:06:20 - 05/09/94 - -=> EW-three <=- Boot Started
22:06:20 - 05/09/94 - Failed to load 'rooms' keys
22:06:20 - 05/09/94 - Failed to load player file 'a'
22:06:20 - 05/09/94 - Failed to load player file 'b'

...

22:06:20 - 05/09/94 - Failed to load player file 'y'
22:06:20 - 05/09/94 - Failed to load player file 'z'
Character Saved ...
Room deleted.
Character Saved ...
Room deleted.
22:06:20 - 05/09/94 - Failed to load track file
22:06:20 - 05/09/94 - Failed to load note hash0
22:06:20 - 05/09/94 - Failed to load note hash1

...

22:06:20 - 05/09/94 - Failed to load note hash38
22:06:20 - 05/09/94 - Failed to load note hash39
22:06:20 - 05/09/94 - Can't find file:files/players/banished_players
22:06:20 - 05/09/94 - Main socket bound and listening on port 2010
22:06:20 - 05/09/94 - Failed to connect to alive socket - ignoring

You will get the 'Failed to connect to alive socket - ignoring' message
whenver you boot the server without the first booting the angel (this is
an ok thing to do, it just means you don't get the crash protection 
offered by the angel)

The first thing you will want to do is log in as the administrator 
character mentioned in plists.c (line 883). This will be the only char
with any privs to start with, and should be used by the program maintainer.
The login will look something like this ...

$ telnet localhost 2010
Trying 127.0.0.1...
Connected to your.local.host
Escape character is '^]'.

This is the logon header that is shown before the 'Please enter name' prompt.

Please enter your name:admin

This is a page shown during the login sequence for new users.

Hit return to continue:

This is another page shown during the login sequence, its a good
idea to put your rules in here.


Hit return to continue:


You entered the name 'Admin' when you first logged in.
Is this the name that you wish to be known as on the program ?

Answer Y or N:y


The program requires that you enter your gender.
This is used solely for the purposes of correct english and grammar.
If you object to this, then simply type 'n' for not applicable.

Enter (M)ale, (F)emale or (N)ot applicable:m
Gender set to Male.

This is a disclaimer message. Its a good idea to have a disclaimer
to prevent yourself getting into any legal difficulties.


Enter 'continue' or 'end':continue

This is the motd, shown whenever someone connects.

Eeeeeeek ! No saved bits !
 --
A simple entrance room.


There is nobody here but you.
->privs
You have a list.
You can echo.
You can use room commands.
You can send mail.
You can set sessions.
You are an advanced superuser
You are a lowly little admin thingie.
You are an administrator.
->shutdown

Shutting down server.

->

          ---====>>>> Program shutting down NOW <<<<====---


Tried to save character but failed ...
Your character will not save until you set a password.
Simply type 'password' whilst in command mode to set one.
Tried to save character but failed ...
Your character will not save until you set an email address.
To set this just type 'email <whatever>', where <whatever> is your
email address.
If you do not have an email, please speak to one of the superusers.
Character Saved ...
Connection closed by foreign host.


Note that users will connect to rooms owned by the 'ENTRANCE_NAME'
user, and will actually be thrown into any such rooms at random, upto
the maximum specified in config.h. Should all these rooms become full,
further users will go into the void.


Short description of source files, this isn't exhaustive, nor necessarily
true anymore.

	Makefile	-	GNU makefile, type 'make' to build
	admin.c		-	Superuser functions
	angel.c		-	The guardian angel, a seperate binary to the
				server that tries to keep the server alive.
	clist.h		-	command list
	commands.c	-	functions for miscellaneous commands
	compaction.c	-	Simple (but quick!) text compression.
	config.h	-	configurables
	dynamic.c	-	blocked file support
	dynamic.h	-	defs for above
	editor.c	-	The editor used for rooms, mail etc
	fix.h		-	unused
	globals.c	-	global vars
	glue.c		-	holds everything together, this is where
				main() is.
	lists.c		-	stuff to do with lists.
	mail.c		-	internal mail and enws
	malloc.c	-	An alternative to the system malloc
	mms.c		-	The moved message server, useful for if
				the server isnt around for a while
	parse.c		-	command parsing, timer functions and help
	pc.c		-	unused
	player.h	-	lots and lots of defs
	plists.c	-	player database manipulation
	room.c		-	room stuff
	session.c	- 	misc bits added by Chris Hughes
	socket.c	-	telnet handling
	tag.c		-	who commands, and handling of lists of
				players for various commands.

Have fun with the code, but don't expect it to work miracles. The essence of
a good talker is its atmosphere, and you wont get that just by copying this
code. You have to code hard, make it unique and be prepared to put in major
amounts of time and effort.


Simon Marsh, September 1994
You can’t perform that action at this time.