Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:467] INL Robot patches




Hopefully the two patches I sent to Vanilla-L went out successfully.

In addition to applying the patches, two new links must be placed
in the robots directory.

ln -s ../ntserv/gencmds.c
ln -s ../ntserv/gencmds.h

The patches include many bug fixes, a confine command,
overtime support, pseudo timeout support, a pass option when
selecting races, and new message command code.

These patches have been sitting on my account in buffalo for over
13 months.  My apologies to anyone who reinvented the wheel in
the mean time.  (When I left school last year, netrek wasn't high
on my priorities list.. :-(  )

The old messaging system used in command.c used some really ugly code.
After compiling, at least 4 different command.o files were created
- one for ntserv, and one for each robot compiled.  When I was working
on the Robot a year ago, I wanted the 'help' command to list only
those options that were applicable to the current person/scenario.
(The way the INL Server does it.)  However, working with command.c
was more trouble than it was worth, and I ended up replacing it
with gencmds.c, gencmds.h, ntscmds.c, and inlcmds.c.  These new files
store the general command interface code in gencmds.c, ntserv specific
commands in ntscmds.c and inl specific commands in inlcmds.c.
(inlcmds.c and ntscmds.c call routines in gencmds.c - Making everything
modular and easier to work with.)

The patches I sent out do not activate ntscmds.c - The ntserv process
will continue to use the existing command.c interface.  I have included
a patch to ntserv/Makefile at the end of this message if anyone wants
to check out the file ntscmds.c.  If it works, you shouldn't notice
any change.  However, it is better code IMO, and should be easier to work
with.

Also, ntscmds.c has the ability to expire voting requests.  (EG, if someone
sends eject 0 to himself, his request to eject 0 will be recorded until
0 is ejected, or until you leave.  With ntscmds.c voting requests can
self-expire after a certain time.)
If I recall correctly, the eject command will expire after 30 seconds..
But this value should be easily modified.

If anyone wishes to contact me, please use the address
joeocon@worldnet.att.net.

Hope this helps.. --Kevin (aka Insufficient)


************************  Patch to activate ntscmds.c ***************

*** ntserv/Makefile.orig        Sat Apr  5 03:45:30 1997
--- ntserv/Makefile     Sat Apr  5 03:45:38 1997
***************
*** 14,20 ****
            reserved.o  sintab.o  socket.o  smessage.o  startrobot.o \
            sysdefaults.o  timecheck.o  torp.o  util.o  warning.o \
            $(RSA_OBJS)  ping.o $(RANDOMO) getpath.o $(STRDUPO) features.o \
!           distress.o transwarp.o commands.o openmem.o feature.o queue.o \
              slotmaint.o
  
  
--- 14,20 ----
            reserved.o  sintab.o  socket.o  smessage.o  startrobot.o \
            sysdefaults.o  timecheck.o  torp.o  util.o  warning.o \
            $(RSA_OBJS)  ping.o $(RANDOMO) getpath.o $(STRDUPO) features.o \
!           distress.o transwarp.o gencmds.o ntscmds.o openmem.o feature.o queue.o \
              slotmaint.o
  
  
***************
*** 32,38 ****
            redraw.c  reserved.c  sintab.c  socket.c  smessage.c \
            startrobot.c  timecheck.c  torp.c  util.c  warning.c \
            $(RANDOMC)  ping.c getpath.c $(STRDUPC) $(RSA_SRC) features.c \
!           distress.c transwarp.c commands.c openmem.c feature.c queue.c \
              slotmaint.c wander2.c
  
  
--- 32,38 ----
            redraw.c  reserved.c  sintab.c  socket.c  smessage.c \
            startrobot.c  timecheck.c  torp.c  util.c  warning.c \
            $(RANDOMC)  ping.c getpath.c $(STRDUPC) $(RSA_SRC) features.c \
!           distress.c transwarp.c gencmds.c ntscmds.c openmem.c feature.c queue.c \
              slotmaint.c wander2.c

-- 
 ------------------------------------------------------------------------
 | Kevin O'Connor               "BTW, IMHO we need a FAQ for 'RTFM',    | **
 | koconnor@acsu.buffalo.edu    'IMHO', 'IMO', 'FAQ', 'BTW', etc. !"    | **
 ------------------------------------------------------------------------ **
   *************************************************************************