Skip to content

Commit

Permalink
Merge pull request #12 from amnuts/develop
Browse files Browse the repository at this point in the history
Docker, bug fixes, and more
  • Loading branch information
amnuts committed Mar 18, 2023
2 parents 8b420a4 + 0c33c4f commit 8f1de57
Show file tree
Hide file tree
Showing 515 changed files with 13,156 additions and 12,732 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
.cproject
.project
.idea
.vscode
src/objects
!src/objects/.gitignore
!src/objects/.gitkeep
compile_commands.json
cmake-build-debug/
docker-compose.yml
Dockerfile
amnutsIdent
amnutsTalker
supervisord.pid
supervisord.log
11 changes: 5 additions & 6 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+-----------------------------------------------------------------------------+
COPYRIGHT - COPYRIGHT - COPYRIGHT - COPYRIGHT - COPYRIGHT - COPYRIGHT
Copyright information for Amnuts
Copyright information for Amnuts
+-----------------------------------------------------------------------------+

Preamble
Expand All @@ -11,15 +11,15 @@ with ID 1027006837.1806.0.nnrp-07.c2de0bc0@news.demon.co.uk
posted to newgroups alt.talkers, alt.talkers.nuts, and
alt.talkers.programming that he was now allowing all versions
of his NUTS codes to optionally be distributed under the General
Public License. For reference this mesage can be accessed at the URL:
Public License. For reference this message can be accessed at the URL:
http://groups.google.com/groups?selm=1027006837.1806.0.nnrp-07.c2de0bc0%40news.demon.co.uk
For further information on NUTS licensing see the file docs/nuts_copyright.


Copyright Information for Amnuts code
-------------------------------------

Amnuts 2.3.0 A Unix Talk Server via Telnet
Amnuts, A Unix Talk Server via Telnet
Copyright (C) 1996-1996 Neil Robertson (Boltar) [NUTS]
Copyright (C) 1997-2003 Andrew Collington (Andy) [Amnuts]
Copyright (C) 1999-1999 Gordon Chiu (Ardant) [ident-daemon]
Expand Down Expand Up @@ -68,7 +68,6 @@ associated files. This copyright pertains to ANY version of Amnuts,
documents, or web site. If you have any problems with this copyright
notice then you should not use the code at all.

Andrew Collington
September, 2001

Andrew Collington
February, 2023
+-----------------------------------------------------------------------------+
28 changes: 16 additions & 12 deletions IMPORTANT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+-----------------------------------------------------------------------------+
IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT
Information for the running of a talker based on Amnuts
IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT - IMPORTANT
Information for the running of a talker based on Amnuts
+-----------------------------------------------------------------------------+

If you are installing this Amnuts version as a fresh talker, with no prior
Expand All @@ -10,11 +10,11 @@ upgrade your existing talker, or are going to use this code as your base and
add bits from your existing talker, then it is vital you read this document and
the others before you make any changes.

First off, support is only given through the websites, and not through private
email. You can gain support through the main Amnuts website
(http://amnuts.talker.com/ or http://www.amnuts.org/), or if you are looking
to submit bugs or get the latest updated files, then you can gain that through
the developer's site (http://www.amnuts.net/).
First off, support is only given through the GitHub site, where you can get the
latest version, submit issues or request features, and so on. The address is:

https://amnuts.net/
or https://github.com/amnuts/Amnuts

The main difference you will notice about this code and any of the previous
releases is that Amnuts now comes in many different files. This means that if
Expand All @@ -30,7 +30,11 @@ More information can be found in the 'compiling' document, found in the 'docs'
directory. You should read the compiling document, and then have a look at the
Makefile and familiarize yourself with it.

The ident deamon needs to be run separately. This is because it's a separate
If you don't have all the software installed that's required for compiling,
you can also compile and run via docker. More information can be found in the
'docs/docker' file.

The ident daemon needs to be run separately. This is because it's a separate
program to the talker, compiled as its own executable.

Remember to login initially with the username 'test' and the password 'test'.
Expand All @@ -43,12 +47,12 @@ name changing command. :)
The *MOST* important thing to remember though is; RTFM!! Read the
documents supplied with the distribution, look at the code, try something
out.. Only then if that fails should you go asking questions on boards and
such. It also helps if you give an example of what you've tried too.
such. It also helps if you give an example of what you've tried, too.
Bug reports I'm still up to receiving, but even then, don't be upset if
you don't get a thorough response.


Andrew Collington
The Amnuts Development Team
August, 2003
Andrew Collington
The Amnuts Development Team
February, 2023
+-----------------------------------------------------------------------------+
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# General setup of GCC and compiler flags, base directories, etc.
#
BINDIR = $(CURDIR)
BINDIR = $(CURDIR)/build
INCDIR = $(CURDIR)/src/includes
PERMS = 755
CC = gcc
Expand All @@ -15,8 +15,8 @@ LD_FLAGS =
# remove the '-DNETLINKS' - same for the others.
# Possible flags are (each starting with '-D'):
# GAMES - include games
# WIZPORT - Allow a seperate port just for WIZ levels to use
# IDENTD - Ident Deamon
# WIZPORT - Allow a separate port just for WIZ levels to use
# IDENTD - Ident Daemon
# MANDNS - Manual DNS lookups
# NETLINKS - The infamous Netlinks
#
Expand All @@ -25,7 +25,7 @@ TALKER_FLAGS = -DGAMES -DWIZPORT -DIDENTD -DMANDNS -DNETLINKS
#
# Locations and binary name for talker build
#
TALKER_BIN = amnuts230
TALKER_BIN = amnutsTalker
TALKER_SRC_DIR = $(CURDIR)/src
TALKER_OBJ_DIR = $(TALKER_SRC_DIR)/objects
TALKER_SRC = $(wildcard $(TALKER_SRC_DIR)/*.c $(TALKER_SRC_DIR)/commands/*.c)
Expand Down Expand Up @@ -84,7 +84,7 @@ distclean: clean
rm -f $(INCDIR)/*.[ch]~ $(INCDIR)/*.[ch].bak

clean:
@echo "Removing object and dependancy files"
@echo "Removing object and dependency files"
rm -f $(TALKER_OBJS) $(TALKER_OBJS:.o=.d)
rm -f $(IDENTD_OBJS) $(IDENTD_OBJS:.o=.d)
rm -f $(VENDOR_SDS_OBJS) $(VENDOR_SDS_OBJS:.o=.d)
Expand All @@ -102,6 +102,7 @@ vpath %.c $(TALKER_SRC_DIR) $(TALKER_SRC_DIR)/commands $(IDENTD_SRC_DIR) $(VENDO
$(BINDIR)/$(TALKER_BIN) $(BINDIR)/$(IDENTD_BIN): $(BINDIR)/%: %
@echo "Installing $< ..."
chmod $(PERMS) $<
mv $< $(BINDIR)

$(TALKER_BIN): $(TALKER_OBJS) $(VENDOR_SDS_OBJS)
@echo "Linking $@ ..."
Expand Down
60 changes: 26 additions & 34 deletions README
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
+-----------------------------------------------------------------------------+
README - README - README - README - README - README - README - README - README
Introductory information for the Unix talker code Amnuts
README - README - README - README - README - README - README - README
Introductory information for the Amnuts talker code
+-----------------------------------------------------------------------------+

Welcome to the Amnuts talker code, version 2.3.0! Or, if you have already
used Amnuts, then welcome back! This is the latest version of Amnuts and MANY
things have changed.
Welcome to the Amnuts talker code! Or, if you have already used Amnuts, then
welcome back - it's good to still have you with us. :-)

Amnuts development slowed down for a (long) while, but thanks to two people
in particular, it managed to get back on track. These people go by the handles
'Ardant' and 'Uzume'. Ardant supplied a CVS repository and bug tracking
software for Amnuts, and Uzume and worked tirelessly in updating Amnuts and
making it more stable. Many thanks to both of them.
It has been 20 years - yup, two whole decades - since this README was last
updated, and, honestly, not much has changed in the world of Amnuts Talkers.
The Golden Age of talkers has long past, though it's still awesome to see some
die-hard fans still out there and keeping talkers alive (Marado's TalkerNode,
for example).

Because of the CVS and Bugzilla, a new website was set up for the development
of the Amnuts talker code. This can be found at:
As for Amnuts, as you're undoubtedly aware, it's now available from GitHub.
You can get there from:

http://www.amnuts.net/
https://amnuts.net/
or https://github.com/amnuts/Amnuts

Instructions can be found there on how to use CVS and Bugzilla. If you find
any bugs with this version of Amnuts then it would be appreciated if you use
Bugzilla to report them. From the CVS repository you can download the latest
files.
You can submit issues and post up on the discussion board there. Please feel
free to fork and submit pull requests.

The Amnuts code can be found, as always, at:
To get started with Amnuts you'll need either a linux environment or you can
use docker. For further details, see the docs/docker and and other related
files in the docs directory.

http://amnuts.talker.com/
Lots of the documentation and files here haven't been updated for those same
two decades, but hopefully one day they will be revived and revamped. Until
then, just head towards the wind and push on as best you can. ;-)

or can now also be access via:
Thanks for using Amnuts, and as you're here you must be interested in talkers,
so thanks also for keeping those alive! Enjoy!

http://www.amnuts.org/

Please read the 'IMPORTANT' file, and the 'amnuts_changes' in the DOCs
directory for more information on what changes have been made since
version 2.2.1 (the previous release to this one) because there have been a
LOT of them! Even if you are a previous Amnuts user, programmer, owner,
whatever - you should STILL READ THE FILES! :)

Thanks for using Amnuts! Enjoy!


Andrew Collington
The Amnuts Development Team
August, 2003
Andrew Collington
The Amnuts Development Team
February, 2023
+-----------------------------------------------------------------------------+
File renamed without changes.
4 changes: 0 additions & 4 deletions datafiles/car_park.R

This file was deleted.

1 change: 0 additions & 1 deletion datafiles/toilets.R

This file was deleted.

52 changes: 52 additions & 0 deletions docker-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash

MACHINE=$(uname -m)
if [ "$MACHINE" == "x86_64" ] || [ "$MACHINE" == "i686" ]; then
OS_ARCH="amd64"
elif [ "$MACHINE" == "aarch64" ] || [ "$MACHINE" == "arm64" ]; then
OS_ARCH="arm64v8"
else
OS_ARCH="amd64"
echo "Unknown platform - falling back to amd64"
fi

CONFIG_FILE="$(pwd)/files/datafiles/config"
MAIN_PORT=$(grep "\bmainport\b" "$CONFIG_FILE" | awk '{ print $2 }')
WIZ_PORT=$(grep "\bwizport\b" "$CONFIG_FILE" | awk '{ print $2 }')
LINK_PORT=$(grep "\blinkport\b" "$CONFIG_FILE" | awk '{ print $2 }')

cat << EOT > Dockerfile
FROM ${OS_ARCH}/alpine
RUN apk add build-base supervisor bash busybox-extras gdb
COPY supervisord.conf /etc/supervisord.conf
WORKDIR /amnuts
EXPOSE $MAIN_PORT
EXPOSE $WIZ_PORT
EXPOSE $LINK_PORT
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
EOT

cat << EOT > docker-compose.yml
version: "3"
services:
amnuts:
build: ./
image: amnuts-build
environment:
- "MAIN_PORT=$MAIN_PORT"
- "WIZ_PORT=$WIZ_PORT"
- "LINK_PORT=$LINK_PORT"
ports:
- "${MAIN_PORT}:${MAIN_PORT}"
- "${WIZ_PORT}:${WIZ_PORT}"
- "${LINK_PORT}:${LINK_PORT}"
volumes:
- .:/amnuts
security_opt:
- seccomp:unconfined
cap_add:
- SYS_PTRACE
EOT
2 changes: 1 addition & 1 deletion docs/about_dirs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the form <map name>.map.
Also the 2 ban files: sitebans and userbans are stored here which store
banned sites and banned users.

There is another directory in here, 'old_datafiles', just incase any of you
There is another directory in here, 'old_datafiles', just in case any of you
wanted the old rooms and config files.


Expand Down
56 changes: 56 additions & 0 deletions docs/docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
+------------------------------------------------------------------------------+
DOCKER - DOCKER - DOCKER - DOCKER - DOCKER - DOCKER - DOCKER - DOCKER - DOCKER
Information on spinning up Amnuts with Docker
+------------------------------------------------------------------------------+

The Docker setup for Amnuts is pretty new and probably doesn't cover all the
needs you could want, and if you have to change things then you're pretty much
on your own. However, it could provide you a way to compile and run an Amnuts
based talker without having all the GCC requirements installed... So long as
you have bash and docker, you should be able to get up and running pretty easily.

To start with, you'll need to run:

./docker-startup.sh

This will create the Dockerfile and docker-compose.yml files for your platform
(amd64 or arm64v8 are supported). If you make changes to the docker-startup.sh
file or the accompanying supervisord.conf file, you'll need to remove the
previously built image (assuming you have built one) and run the docker-setup
file again.

To compile the code, use the command:

docker-compose run --rm amnuts make install

This will build the image if you haven't already, create a container, compile
the talker, then remove the container. Because all the files are mounted as a
volume, you'll not lose any files when the container is removed.

In fact, you can run any of the Makefile commands this way, eg:

docker-compose run --rm amnuts make distclean

If you want to jump on the container itself, use:

docker-compose run --rm amnuts /bin/bash

Once you have run the "make install" command, you can then start the talker
with:

docker-compose run -d --service-ports amnuts

This will run a container in the background with the Amnuts talker running.
Supervisord is used to keep the process going.

Alternatively, you can simply build the image with:

docker-compose build

And then run it with:

docker-compose up

The docker setup is in its early stages, so may well be adapted and changed
over time. Your mileage may vary. Use your best judgement. Try things out.
Raise an issue or a pull request if you know a better way!
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion datafiles/box.R → files/datafiles/box.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This is a box. It does box things, like.. hold stuff. It's not big, it's
not clever and it's not worth describing in detail.
not clever, and it's not worth describing in detail.
4 changes: 4 additions & 0 deletions files/datafiles/car_park.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
There is a wide expanse of concrete in front of you. Somewhere in the
distant, just on the end of your range of vision, you see... yes, it's a
car. You look up at the building behind you and wonder if it really needs
a car-park this big with the few people who actually work in there.
2 changes: 1 addition & 1 deletion datafiles/conference.R → files/datafiles/conference.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
There is a musty smell here, and it is very cold. You correctly guess
that not many people use this room. It's very plain, very boring. You
give up even looking at the room and fall asleep - well why not? The boss
isn't here afterall!
isn't here after all!
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions datafiles/store_room.R → files/datafiles/store_room.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The icicles hang down and your breath turns to frost in the air. There is
much paper and booklets around here and the temptating to burn them and
much paper and booklets around here and the temptation to burn them and
make a nice roaring fire is almost overwhelming... after all, the
air-conditioning is out of bounds so you have to stay warm somehow!
air-conditioning is out of bounds, so you have to stay warm somehow!
1 change: 1 addition & 0 deletions files/datafiles/toilets.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cold, damp, and never flush. Need anymore be said?
4 changes: 2 additions & 2 deletions datafiles/wizroom.R → files/datafiles/wizroom.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
The portal to the real world shimmers and vibrates. The dark blue oval
shapes looks right at home here in the room, with it's strange containers
on dusty shelves. On the heavy-set desk there are many weighty books
enscribed with a language not of this, or any earthly world. Occasionaly
inscribed with a language not of this, or any earthly world. Occasionally
one of the mysterious items in the jars gurgles or winks at you
cocetishly. This makes you sick to your stomach, but you're glad for the
coquettishly. This makes you sick to your stomach, but you're glad for the
attention - even if it is from a... splodge, swimming around in it's own
mucus.
1 change: 1 addition & 0 deletions files/dumpfiles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.dump
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions files/logfiles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
syslog.*
last_command.*
File renamed without changes.
Loading

0 comments on commit 8f1de57

Please sign in to comment.