🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.amiga
Article #377

Telnet, and Empire

#377
From: MushyPea
Date: Sat, 03 Feb 1996 00:00
66 lines
3410 bytes
Firstly, some background:

I have a game called Empire, by Chris Gray and David Wright, v2.25w BETA,
dated 13/09/91.  This is a strategy game that is designed to be run both on
the server and via the serial port.

However, since the main program you use to play the game uses only standard
input/output, I figured it must be possible to play the game over the
internet using telnet.  I'm using AmiTCP v4.0 on my Amiga.

Well, I added a port in my Services file:

    empiretelnet tcp/7777

and I also added a line in my inetd.cfg:

    empiretelnet stream tcp dos bin - s:RemoteEmpire

s:RemoteEmpire looks something like this:

    stack 30000
    Games:Empire/Progs/Empire -n -a

(the -a disables ANSI control sequences, and the -n prevents remote users
 from creating event logs on your machine)


What happens?  Well, if *I* telnet to myself (ie. telnet localhost 7777)
then I can connect and play Empire quite happily, so I must have succeeded in
setting the port up correctly...

However, if someone else (remotely) tries to connect, they are given the
correct prompts, but when they try and create a country in Empire, it reports
an invalid creation password... even though I know exactly what the password
is and have told them.

A quick perusal of the empire.log file shows that there is an extra symbol on
the end of both the country name they have entered, and the password they
have entered.  Further examination of empire.log using a hex viewer shows
that the extra symbol is a Carriage Return.

So... how do I get rid of these carriage returns?  Is there a way for me to
filter them out?  Empire does *not* support this, since it is designed to
work on an Amiga that doesn't issue the CR code at the end of a line.

I am hoping that there is a simple way I can get AmiTCP to filter out these
codes for me, but failing that I have had another idea, and that would be to
program a small utility that takes incoming data, strips out CRs, and passes
this on to Empire, and then collects the output from Empire and passes it
back out to the remote machine.  Since the telnet system on AmiTCP simply
uses stdin/stdout to send/receive data from the remote machines, this
shouldn't be *too* tricky... but I don't really know how to go about this.


If anyone has any idea how I can solve this problem, I'd be grateful if you
could let me know.  If possible, could you email me your reply as well as or
instead of posting here, since I am having difficulties reading newsgroups at
the moment.

Thanks in advance.

-- 
MushyPea/EtCetera (Ian Marsh) [680x0 coder, musician]       ___MMM___
Internet: MushyPea@etchq.demon.co.uk (EtCetera HQ)            (O O)
A1200 030-50MHz 2Mb+8Mb SCSI-II 1700MbHD 3xCD 28800Vfc ---oOO--(_)--OOo---
KS3.0 / AmiTCP v4.0 / GoldED v3 / PGP v2.6ui / ADMaN v1.7
Technical Details
Message-ID: <9602031701.AA001nk@etchq.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1160fd,8543994a0696828b,start
X-Google-Attributes: gid1160fd,public
X-Google-Thread: 11015b,8543994a0696828b,start
X-Google-Attributes: gid11015b,public
From: MushyPea <MushyPea@etchq.demon.co.uk>
Subject: Telnet, and Empire
Date: 1996/02/03
Message-ID: <9602031701.AA001nk@etchq.demon.co.uk>
X-Deja-AN: 138531930
x-mail2news-path: disperse.demon.co.uk!post.demon.co.uk!etchq.demon.co.uk
x-nntp-posting-host: etchq.demon.co.uk
newsgroups: demon.tech.amiga,demon.ip.support.amiga