Commits

Palmer, 2E0EOL committed ee10ae0

Entire changeset 0.1.4 -> 0.1.5

  • Participants
  • Parent commits fda244a

Comments (0)

Files changed (139)

+$Id: ChangeLog,v 0.1 2003/02/08 09:40:00 ddrp Ex$
+
 This ChangeLog was created 24/11/2001
 It is updated often and between releases
 with any changes to the tree and made available
 at least every server release.
 
 
+0.1.5
+-----
+DDRP: raw2c not built with correct OPTLEVEL
+DDRP: configure --interactive chooses default if user types nothing
+DDRP: configure verifies Perl can run
+DDRP: Erased rmw32/, all erasures are now done with tools/erase.pl
+DDRP: Remove obsolete src/overchat_config.h.old
+DDRP: Write comment indicating _RTLDLL commented out if a static build
+DDRP: Fix: Cleanup registration module during GlobalDestruct sequence
+DDRP: md5pwd.c becomes hashpwd.c and creates multiple programs from the
+      same source, md2pwd, md4pwd, md5pwd & sha1pwd
+DDRP: daybocrypt supports RSA MD2, RSA MD4 and SHA-1
+DDRP: Added Ronald Rivest's mddriver into daybocrypt testbed
+DDRP: Ammended cleanup order in GlobalDestruct()
+DDRP: Added some more silly comments to buildtimer
+DDRP: Updated some Makefile.bor files
+DDRP: New portable library creation tool (tools/oclibtool.pl)
+DDRP: Fix a minor warning in src/server_netbuffer.cpp
+DDRP: configure: stdint.h autodetection test added
+DDRP: New directory c99.h/ with c99_stdbool.h and c99_stdint.h
+DDRP: configure: inttypes.h autodetection test added
+DDRP: Removed obsolete email address from shitoptions.h
+DDRP: blake_fs.c: Add O_CREAT mode to UNIX exclusive file opening
+DDRP: Fix file UNIX exclusive file unlocking
+DDRP: Fixed some retarded logic in ChangeDatabaseLocking()
+DDRP: Fix problem blakedb_CountUsers() over-reporting
+DDRP: Write database header if first user is written
+
 0.1.4
 -----
 DDRP: Fix: Build system didn't delete ocquery/ocquery (binary)
+# $Id: GNUmakefile,v 0.1 2003/02/08 21:00:00 ddrp Exp $
+#
+# Copyright (C) 2001-2003 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
 # OverChat master build for for private source tree
 # Maintainer: <www.daybologic.co.uk/mailddrp>
 # Please report problems with _FULL_ output, using the script utility
 RTTB_OPTIONS=--disable-debug
 endif
 
+ERASE=perl tools/erase.pl
+
 # Master build rule
 all : _daybodep depend basictools memory_debugger libs blake_lib overchat cgi _clients _supdae advtools _testbed
 	cd buildtimer ; $(TMAKE) -f $(THISFILE) stop
 	-cd occdtk && $(TMAKE) -f $(THISFILE) depend
 	-cd ocquery && $(TMAKE) depend
 	-cd raw2c && $(TMAKE) -f $(THISFILE) depend
-	-cd rmw32 && $(TMAKE) -f $(THISFILE) depend
 	-cd rttb && $(TMAKE) -f $(THISFILE) depend
 	-cd src && $(TMAKE) -f $(THISFILE) depend
 	-cd testbed && $(TMAKE) -f $(THISFILE) depend
 	cd buildtimer && $(TMAKE) -f $(THISFILE) start
 	cd buildnum && $(TMAKE) -f $(THISFILE) all
 	$(TMAKE) -f $(THISFILE) do_obn
-	cd rmw32 && $(TMAKE) -f $(THISFILE) all
 	cd raw2c && $(TMAKE) -f $(THISFILE) all
 	cd watchproc && $(TMAKE) -f $(THISFILE) all
 
 	cd testbed && $(TMAKE) -f $(THISFILE) run
 
 mrproper : clean
-	-rm -rf .resp
 	cd configure && $(TMAKE) -f $(THISFILE) clean
 
 clean : testbed_clean advtools_clean supdae_clean clients_clean cgi_clean overchat_clean blake_lib_clean rttb_lib_clean dlini_lib_clean memory_debugger_clean daybocrypt_clean basictools_clean daybodep_clean
-	-rm -f core overchatd.core
+	-$(ERASE) core overchatd.core
 
 overchat_clean:
 	cd src && $(TMAKE) -f $(THISFILE) clean
 basictools_clean:
 	cd buildnum && $(TMAKE) -f $(THISFILE) clean
 	cd raw2c && $(TMAKE) -f $(THISFILE) clean
-	cd rmw32 && $(TMAKE) -f $(THISFILE) clean
 	cd buildtimer && $(TMAKE) -f $(THISFILE) clean
 	cd watchproc && $(TMAKE) -f $(THISFILE) clean
 

File Makefile.bor

-# OverChat master build for for private source tree
-# Maintainer: <Overlord@DayboLogic.co.uk>
-# Please report problems with _FULL_ output
+# $Id: Makefile.bor,v 0.2 2003/02/08 19:15:00 ddrp Exp $
+#
+# Copyright (C) 2001-2003 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# OverChat master build for for source tree
+# Maintainer: DDRP <daybologic.co.uk/mailddrp>
+# Please report problems with _FULL_ output, using the script utility
 
 !include MasterMake.bor
 
+# If we don't even know our own filename, print the message in
+# configure/not_configured.txt
+# Printing nop just means we're safe!
+
+!ifndef THISFILE
+NONSENSE_COMMAND=type configure/not_configured.txt
+!else
+NONSENSE_COMMAND=echo "nop"
+!endif
+
+!ifdef DEBUG
+DPCRTLMM_OPTIONS=--disable-threads --enable-debug --enable-log --maxport
+RTTB_OPTIONS=--enable-debug
+!else
+DPCRTLMM_OPTIONS=--disable-threads --disable-debug --disable-log --maxport
+RTTB_OPTIONS=--disable-debug
+!endif
+
+ERASE=perl tools/erase.pl
 
 # Master build rule
-all : tools memory_debugger blake_lib overchat cgi _clients
-	@echo Build complete
+all : _daybodep depend basictools memory_debugger libs blake_lib overchat cgi _clients _supdae advtools _testbed
+	cd buildtimer
+	$(TMAKE) -f $(THISFILE) stop
+	cd ..
+	@echo Build complete.  You may want to run a make test
 
-tools:
-	cd buildnum
-	make -f $(THISFILE) all
-	cd ..
-	make -f $(THISFILE) do_obn
-	cd rmw32
-	make -f $(THISFILE) all
-	cd ..
-	cd raw2c
-	make -f $(THISFILE) all
+_daybodep:
+	$(NONSENSE_COMMAND)
+	cd daybodep
+	$(TMAKE) -f Makefile_oc.bor
 	cd ..
 
-blake_lib : blake.lib
-
-blake.lib:
-	cd blake
-	make -f $(THISFILE)
+daybodep_clean:
+	cd daybodep
+	$(TMAKE) -f Makefile_oc.bor clean
 	cd ..
 
-overchat : overchat.exe
+depend:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 1                                       "
+	@echo "  Generate autodependencies                     "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	@echo
 
-overchat.exe : src/$(THISFILE)
-	cd src
-	make -f $(THISFILE) overchat
+	cd blake
+	-$(TMAKE) -f $(THISFILE) depend
 	cd ..
 
+	cd buildnum
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
 
-clean : cgi_clean overchat_clean blake_lib_clean memory_debugger_clean tools_clean _clients_clean
+	cd buildtimer
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd c2raw
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd cgi-bin
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd clients
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd committee
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd configure
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd daybodep
+	-$(TMAKE) -f Makefile_oc.bor depend
+	cd ..
+
+	cd daybocrypt
+	-$(TMAKE) -f Makefile_oc.bor depend
+	cd ..
+
+	cd db2fix
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd dlini
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd dpcrtlmm
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd mailall
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd NetBuffer
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd occdtk
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd ocquery
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd raw2c
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd rttb
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd src
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd testbed
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd tools
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+	cd watchproc
+	-$(TMAKE) -f $(THISFILE) depend
+	cd ..
+
+basictools:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 2                                       "
+	@echo "  Essential tools                               "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	@echo
+	cd buildtimer
+	$(TMAKE) -f $(THISFILE) start
+	cd ..
+
+	cd buildnum
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+	$(TMAKE) -f $(THISFILE) do_obn
+
+	cd raw2c
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+	cd watchproc
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+blake_lib : blake$(LIB)
+
+blake$(LIB):
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 4                                       "
+	@echo "  Blake                                         "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	@echo
+	cd blake
+	$(TMAKE) -f $(THISFILE)
+	cd ..
+
+libs : dlini_lib daybocrypt_lib rttb_lib
+
+dlini_lib:
+	cd dlini
+	$(TMAKE) -f $(THISFILE)
+	cd ..
+
+daybocrypt_lib:
+	cd daybocrypt
+	$(TMAKE) -f Makefile_oc.bor run
+	cd ..
+
+overchat : overchatd
+
+overchatd : src/$(THISFILE) src/*$(H) src/*$(C)
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 5                                       "
+	@echo "  The OverChat server                           "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	cd src
+	$(TMAKE) -f $(THISFILE)
+	cd ..
+
+test:
+	cd testbed
+	$(TMAKE) -f $(THISFILE) run
+	cd ..
+
+mrproper : clean
+	cd configure
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+clean : testbed_clean advtools_clean supdae_clean clients_clean cgi_clean overchat_clean blake_lib_clean rttb_lib_clean dlini_lib_clean memory_debugger_clean daybocrypt_clean basictools_clean daybodep_clean
+	-$(ERASE) core overchatd.core
 
 overchat_clean:
 	cd src
-	make -f $(THISFILE) clean
+	$(TMAKE) -f $(THISFILE) clean
 	cd ..
 
 blake_lib_clean:
 	cd blake
-	make -f $(THISFILE) clean
+	$(TMAKE) -f $(THISFILE) clean
 	cd ..
 
-tools_clean:
-	cd buildnum
-	make -f $(THISFILE) clean
-	cd ..
-	cd blakemake
-	make -f $(THISFILE) clean
-	cd ..
-	cd raw2c
-	make -f $(THISFILE) clean
-	cd ..
-	cd rmw32
-	make -f $(THISFILE) clean
+dlini_lib_clean:
+	cd dlini
+	$(TMAKE) -f $(THISFILE) clean
 	cd ..
 
-_clients_clean:
-	cd clients
-   make -f $(THISFILE) clean
-   cd ..
+daybocrypt_clean:
+	cd daybocrypt
+	$(TMAKE) -f Makefile_oc.gnu clean
+	cd ..
 
-memory_debugger : dpcrtlmm\dpcrtlmm.lib
+rttb_clean:
+	cd rttb
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
 
-dpcrtlmm\dpcrtlmm.lib:
+basictools_clean:
+	cd buildnum
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+	cd raw2c
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+	cd buildtimer
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+	cd watchproc
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+memory_debugger : dpcrtlmm/dpcrtlmm$(LIB)
+
+rttb_lib : rttb/lib/rttb$(LIB)
+
+dpcrtlmm/dpcrtlmm$(LIB):
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 3                                       "
+	@echo "  Libraries                                     "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	@echo
 	cd dpcrtlmm
-	make -f $(THISFILE) config
-	config --enable-threads --enable-debug --disable-log
-	make -f $(THISFILE) example
+	$(TMAKE) -f $(THISFILE) config
+	./config $(DPCRTLMM_OPTIONS)
+	$(TMAKE) -f $(THISFILE) example
+	cd ..
+
+rttb/lib/rttb$(LIB):
+	cd rttb
+	$(TMAKE) -f $(THISFILE) rttb_config
+	./rttb_config $(RTTB_OPTIONS)
+	$(TMAKE) -f $(THISFILE) normal
 	cd ..
 
 memory_debugger_clean:
 	cd dpcrtlmm
-	make -f $(THISFILE) clean
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+rttb_lib_clean:
+	cd rttb
+	$(TMAKE) -f $(THISFILE) clean
 	cd ..
 
 cgi:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 6                                       "
+	@echo "  Common Gateway Interface modules              "
+	@echo "                                                "
+	@echo "------------------------------------------------"
 	cd cgi-bin
-	make -f $(THISFILE) all
+	$(TMAKE) -f $(THISFILE) all
 	cd ..
 
 cgi_clean:
 	cd cgi-bin
-	make -f $(THISFILE) clean
+	$(TMAKE) -f $(THISFILE) clean
 	cd ..
 
 _clients:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 7                                       "
+	@echo "  Service clients                               "
+	@echo "                                                "
+	@echo "------------------------------------------------"
 	cd clients
-   make -f $(THISFILE) all
-   cd ..
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+clients_clean:
+	cd clients
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+_supdae:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 8                                       "
+	@echo "  Supplementry daemons                          "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	cd ocquery
+	$(TMAKE) all
+	cd ..
+
+supdae_clean:
+	cd ocquery
+	$(TMAKE) clean
+	cd ..
+
+
+advtools:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 9                                       "
+	@echo "  Supplementry tools                            "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+
+	cd db2fix
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+	cd tools
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+	cd mailall
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+advtools_clean:
+	cd db2fix
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+	cd tools
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+	cd mailall
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
+
+_testbed:
+	@echo "------------------------------------------------"
+	@echo "                                                "
+	@echo "  Stage 10                                      "
+	@echo "  The testbed                                   "
+	@echo "                                                "
+	@echo "------------------------------------------------"
+	cd testbed
+	$(TMAKE) -f $(THISFILE) all
+	cd ..
+
+testbed_clean:
+	cd testbed
+	$(TMAKE) -f $(THISFILE) clean
+	cd ..
 
 #
 # This rule ensures the OverChat global build number (OBN) is updated before the main
-# source base is built.
+# codebase is built.
 #
 do_obn:
 	cd buildnum
-	buildnum ..\src\_buildnum.h
+	./buildnum ../src/_buildnum.h
 	cd ..

File MasterMake.bor

 #  /*
-#  OverChat
-#  by David Duncan Ross Palmer <Overlord@DayboLogic.co.uk>
-#  Copyright 2002 Daybo Logic, all rights reserved.
+#  Copyright (C) 2001-2003 Daybo Logic.
+#  All rights reserved.
+#
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions
+#  are met:
+#  1. Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+#  2. Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#  3. Neither the name of the project nor the names of its contributors
+#     may be used to endorse or promote products derived from this software
+#     without specific prior written permission.
+#
+#  THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+#  ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+#  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+#  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+#  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+#  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+#  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+#  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+#  SUCH DAMAGE.
 #
 #  This file was auto generated by OverChat's autoconfigurator.
-#  Although the contents of the file, because they are written by
-#  machine and not by human belong to nobody, the program which created
-#  the file (overchat/configure/configure) is owned by DDRP.
+#  (overchat/configure/configure.c)
+#  Do not edit this file!  If you need to change something, run the
+#  configurator again.
 #  */
 
 #
 #
 
 STATIC=-static
-CC=gcc
-CPPC=g++
-#DEBUG=1
+CC=bcc32
+CPPC=bcc32
+DEBUG=1
 OPTLEVEL=
-TMAKE=tmake
+TMAKE=make
 ANSI=-A
-MASTER_CFLAGS=-D__WIN32__  -c
-MASTER_LFLAGS=
+MASTER_CFLAGS=-D__WIN32__ -v -c
+MASTER_LFLAGS=-v
 H=.h
 LIB=.lib
 EXE=.exe

File blake/GNUmakefile

 THREAD_PTHINCLUDE=
 endif
 
-IPATH=-I../src -I. -I../NetBuffer -I../dpcrtlmm -I../dlini $(THREAD_PTHINCLUDE) -I../daybocrypt -I../rttb/lib
+IPATH=-I../src -I../c99.h -I. -I../NetBuffer -I../dpcrtlmm -I../dlini $(THREAD_PTHINCLUDE) -I../daybocrypt -I../rttb/lib
 CFLAGS=$(MASTER_CFLAGS) $(IPATH)
 LFLAGS=$(MASTER_LFLAGS) ../libblake$(LIB) ../dpcrtlmm/libdpcrtlmm$(LIB) ../dlini/libdlini$(LIB) $(THREAD_LIBRARY) ../daybocrypt/libdaybocrypt$(LIB) ../rttb/lib/librttb$(LIB)
 COMPILE=$(CC) $(CFLAGS)
 CPPCOMPILE=$(CPPC) $(CFLAGS)
+ERASE=perl ../tools/erase.pl
 
 OBJECTS=blake$(O) \
         blake_cb$(O) \
 	$(CPPCOMPILE) $<
 
 clean:
-	-$(RM) $(OBJECTS)
+	-$(ERASE) $(OBJECTS)
 	echo " " > .depend
-	-$(RM) .resp
-	-$(RM) ../libblake$(LIB)
-	-$(RM) dllclient dllclient$(O)
+	-$(ERASE) .resp
+	-$(ERASE) ../libblake$(LIB)
+	-$(ERASE) dllclient dllclient$(O)
 	cd res && $(TMAKE) -f $(THISFILE) clean
 
 depend:

File blake/_deps.bor

- 
+
+blake_main.obj : blake_main.c blake.rh blake.h blake_protocol.h blake_portmutant.h blake_network.h blake_pendingloop.h blakedb.h blake_logger.h blake_netbuffer.h blake_lang.h blake_main.h stopcodes.h 
+
+blake.obj : blake.c blake.h blake_protocol.h 
+
+blake_nick.obj : blake_nick.c blake.h blake_main.h 
+
+criticalinteger.obj : criticalinteger.c blake.h 
+
+blake_cb.obj : blake_cb.c blake.h blake_cb.h 
+
+blakedb.obj : blakedb.c blake.h blake_logger.h blake_main.h blakedb.h 
+
+blake_fastqueue.obj : blake_fastqueue.c blake.h blake_main.h 
+
+blake_ll.obj : blake_ll.c blake.h 
+
+blake_network.obj : blake_network.c blake_socket.code 
+
+blake_pendingloop.obj : blake_pendingloop.c blake.h blake_network.h blake_pendingloop.h 
+
+blake_portmutant.obj : blake_portmutant.c blake.h blake_main.h blake_portmutant.h 
+
+blake_portthread.obj : blake_portthread.c blake.h blake_main.h 
+
+blake_protocol.obj : blake_protocol.c blake.h blake_protocol.h blake_cb.h blake.h blake_network.h blake_logger.h blake_debugtables.h blake_main.h stopcodes.h 
+
+blake_trace.obj : blake_trace.c blake.h 
+
+dllclient.obj : dllclient.c blake.h 
+
+recursivemutant.obj : recursivemutant.c blake.h 
+
+blake_ansi.obj : blake_ansi.c blake.h 
+
+blake_strfunc.obj : blake_strfunc.c blake.h 
+
+blake_fs.obj : blake_fs.c blake.h blake_main.h 
+
+blake_logger.obj : blake_logger.c blake.h blake_main.h blake_logger.h 
+
+blake_panic.obj : blake_panic.c blake.h stopcodes.h 
+
+blake_lang.obj : blake_lang.c blake.h stopcodes.h 
+
+blake_safeallocate.obj : blake_safeallocate.c blake.h blake_safeallocate.h 
+
+blake_debugtables.obj : blake_debugtables.c blake.h 
+
+blake_hashes.obj : blake_hashes.c blake.h blake_main.h 
+
+blake_here.obj : blake_here.c blake.h 
+
+blake_authorisedclients.obj : blake_authorisedclients.c blake.h 
+
+blake_bench.obj : blake_bench.c blake.h 
+
+blake_chksum.obj : blake_chksum.c blake.h 
+
+blake.obj : blake.h 
+
+blake_cb.obj : blake_cb.h 
+
+blake_main.obj : blake_main.h 
+
+blake_network.obj : blake_network.h 
+
+blake_pendingloop.obj : blake_pendingloop.h 
+
+blake_portmutant.obj : blake_portmutant.h 
+
+blake_protocol.obj : blake_protocol.h 
+
+blakedb.obj : blakedb.h 
+
+ddrpsocket.obj : ddrpsocket.h 
+
+fastQueueWrapper.obj : fastQueueWrapper.h 
+
+blake_logger.obj : blake_logger.h 
+
+stopcodes.obj : stopcodes.h 
+
+blake_safeallocate.obj : blake_safeallocate.h 
+
+blake_debugtables.obj : blake_debugtables.h 
+
+blake_netbuffer.obj : blake_netbuffer.h 
+
+blake_lang.obj : blake_lang.h 
+
+blake_bench.obj : blake_bench.h 
+
+fastqueuewrapper.obj : fastqueuewrapper.cpp blake.h fastQueueWrapper.h 
+
+blake_netbuffer.obj : blake_netbuffer.cpp blake.h 

File blake/_files.bor

+blake_main.c
+blake.c
+blake_nick.c
+criticalinteger.c
+blake_cb.c
+blakedb.c
+blake_fastqueue.c
+blake_ll.c
+blake_network.c
+blake_pendingloop.c
+blake_portmutant.c
+blake_portthread.c
+blake_protocol.c
+blake_trace.c
+dllclient.c
+recursivemutant.c
+blake_ansi.c
+blake_strfunc.c
+blake_fs.c
+blake_logger.c
+blake_panic.c
+blake_lang.c
+blake_safeallocate.c
+blake_debugtables.c
+blake_hashes.c
+blake_here.c
+blake_authorisedclients.c
+blake_bench.c
+blake_chksum.c
+blake.h
+blake_cb.h
+blake_main.h
+blake_network.h
+blake_pendingloop.h
+blake_portmutant.h
+blake_protocol.h
+blakedb.h
+ddrpsocket.h
+fastQueueWrapper.h
+blake_logger.h
+stopcodes.h
+blake_safeallocate.h
+blake_debugtables.h
+blake_netbuffer.h
+blake_lang.h
+blake_bench.h
+fastqueuewrapper.cpp
+blake_netbuffer.cpp

File blake/all

Empty file removed.

File blake/blake.h

 /*
-$Id: blake.h,v 0.1 2003/01/29 00:00:00 ddrp Exp $
+$Id: blake.h,v 0.2 2003/02/20 12:23:00 ddrp Exp $
 
 Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
   bcidFixedStreamSub         /* DDRP's fixed stream substitution cipher */
 };
 
+/*
+  Note: Hashes are listed from least secure to most secure
+*/
 enum blakeHashType {
-  bhtMd5,                    /* Normal, attackable MD5 hash */
-  bhtDoubleMd5,              /* Double hash, will take months to crack */
-  bhtSha,                    /* Secure Hash Algorithm (will support later) */
-  bhtSha1                    /* PGP SHA1 */
+  bhtUnknown,                /* This is reserved for special use, try not to use it if you don't have to */
+  bhtMd5,                    /* RSA RD5 (Rivest), (128 bits) */
+  bhtSha1,                   /* Secure Hash Algorithm (160 bits) */
+  bhtSha256,                 /* Secure Hash Algorithm (256 bits) */
+  bhtSha384,                 /* Secure Hash Algorithm (384 bits) */
+  bhtSha512                  /* Secure Hash Algorithm (512 bits) */
 };
 
 /* Only authorised clients will be allowed into the system */
   OverChat cannot convert foreign user's languages so that you can talk to
   them.  The challenge digest will have been received when you got the challenge,
   you must know it in order for blake_Login() to generate the correct secure
-  hash for passing the password to the server.  The client ID and version
-  are required for securing the system against unauthorised clients.  They
-  must be correct or later security questions by the server will fail.
+  hash for passing the password to the server.  As of tree 0.1.5, the
+  login hash type has to be passed, if the server returns an error because
+  the login hash is not supported, re-call blake_Login( ) with another hash
+  from the most secure to the least secure until the server accepts you.
+  NOTE: Hashes are listed by enum blakeHashType from the least secure to
+  the most secure.
+  The client ID and version are required for securing the system against
+  unauthorised clients.  They must be correct or later security questions by
+  the server will fail.
 */
-BLAKEAPI(blake_bool_t) blake_Login(int Sock, const char* Username, const char* Password, enum blakeLang Language, const unsigned char ChallengeDigest[BLAKE_MD5HASHLEN], const enum blakeClientID ClientID, const unsigned long ClientVersion);
+BLAKEAPI(blake_bool_t) blake_Login(int Sock, const char* Username, const char* Password, enum blakeLang Language, const unsigned char ChallengeDigest[BLAKE_MD5HASHLEN], const enum blakeClientID ClientID, const unsigned long ClientVersion, enum blakeHashType LoginHashType);
 /*
   Functions called by the server to make the client "shaddup" occasionally.
   Listen to the server when you receive these packets!  Else the server
 BLAKEAPI(enum blakeError) blakedb_UpdateUser(BLAKE_DATABASE_HANDLE DBHandle, unsigned int Index, struct blakedb_User* NewUserRecord, size_t UserRecordSz);
 
 /*
-  This functions allows one to retrieve the header of the database.  Usually
+  This function allows one to retrieve the header of the database.  Usually
   people don't bother with this.
 */
 BLAKEAPI(enum blakeError) blakedb_GetHeader(BLAKE_DATABASE_HANDLE DBHandle, struct blakedb_Header* PHeaderOut);
 
 /*
+  This function allows one to set the header of the database.  No details of
+  the database will be verified, it is effectively a raw write to the header
+  (with endian and other basic issues dealt with).  Writing bad information
+  here will make tools which deal with the database or further reads of the
+  database fail if the information is not valid.  So leave it alone unless
+  you're sure you're doing the right thing!
+*/
+BLAKEAPI(enum blakeError) blakedb_PutHeader(BLAKE_DATABASE_HANDLE DBHandle, const struct blakedb_Header* PHeaderIn);
+
+/*
+  For more refined writing of a header, call blakedb_InitHeader()
+  which will fill a header structure full of the correct data in for you,
+  then call blakedb_PutHeader() above.
+*/
+BLAKEAPI(enum blakeError) blakedb_InitHeader(struct blakedb_Header* PHeader);
+
+/*
   This function allows one to count how many users have been registered,
   it a handle should be aquired, the database locked open, then this can
   be called, don't forget to release lock(s) as soon as possible.

File blake/blake_fs.c

 /*
-Copyright (C) 2001-2003 Daybo Logic.
+Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 #include "blake_main.h" /* Internal functions for Blake */
 /*-------------------------------------------------------------------------*/
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: blake_fs.c,v 0.1 2002/02/27 23:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: blake_fs.c,v 0.3 2003/02/20 13:28:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 /*-------------------------------------------------------------------------*/
 BLAKEAPI(enum blakeError) blake_ExclusiveFileOpen(const char* FileName, blake_bool_t NeedWrite, FILE** PHandle)
     fl.l_len = 0; /* Throughout it's entirety */
     fl.l_pid = getpid(); /* Identify process which owns the file (us) */
 
-    fd = open(FileName, ( (NeedWrite) ? (O_RDWR) : (O_RDONLY) ));
+    fd = open(FileName, O_CREAT | ( (NeedWrite) ? (O_RDWR) : (O_RDONLY) ), 0600);
     if ( fd != -1 ) { /* If no error */
       if ( fcntl(fd, F_SETLKW, &fl) == -1 ) {
         close(fd);
 BLAKEAPI(void) blake_ExclusiveFileClose(FILE* Handle)
 {
   if ( Handle ) {
-    /* I don't think I have to unlock the file in UNIX, just close the handle and I should be finished with it */
-#ifndef __UNIX__ /* Not UNIX */
+#ifdef __UNIX__ /* Not UNIX */
+    struct flock fl;
+    int fd;
+
+    fl.l_type = F_UNLCK;
+    fl.l_whence = SEEK_SET;
+    fl.l_start = 0;
+    fl.l_len = 0;
+    fl.l_pid = getpid();
+
+    fcntl(fileno(Handle), F_SETLK, &fl);
+#else /* Not UNIX */
 # ifdef __BORLANDC__
     int fd = fileno(Handle);
     unlock(fd, 0L, filelength(fd));
 #   error "Can't handle compiler"
 # endif
 #endif
+    close(fileno(Handle));
     fclose(Handle);
   }
 }

File blake/blake_hashes.c

 /*
-Copyright (C) 2001-2003 Daybo Logic.
+Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 #endif /*__WIN32__*/
 
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: blake_hashes.c,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: blake_hashes.c,v 0.1 2003/02/18 21:33:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 /*-------------------------------------------------------------------------*/
 BLAKEAPI(unsigned char*) blake_MD5SecureRandomHash(unsigned char HashOut[BLAKE_MD5HASHLEN])

File blake/blake_protocol.c

 /*
-Copyright (C) 2001-2003 Daybo Logic.
+Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 #include "stopcodes.h" /* For firing fatal panics */
 /*-------------------------------------------------------------------------*/
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: blake_protocol.c,v 0.1 2001/06/20 18:31:00 ddrp Exp $";
+static char rcsid[] = "$Id: blake_protocol.c,v 0.1 2003/02/08 09:37:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 /*-------------------------------------------------------------------------*/
 /* Constants grouped so I don't have to search them out */
 }
 #endif /*BLAKE_SERVER*/
 /*-------------------------------------------------------------------------*/
-BLAKEAPI(blake_bool_t) blake_Login(int Sock, const char* Username, const char* Password, enum blakeLang Language, const unsigned char ChallengeDigest[BLAKE_MD5HASHLEN], const enum blakeClientID ClientID, const unsigned long ClientVersion)
+BLAKEAPI(blake_bool_t) blake_Login(int Sock, const char* Username, const char* Password, enum blakeLang Language, const unsigned char ChallengeDigest[BLAKE_MD5HASHLEN], const enum blakeClientID ClientID, const unsigned long ClientVersion, enum blakeHashType LoginHashType)
 {
   struct blakePacket packet;
 
   packet.code.clientCode = bcclogin;
   i_InitLogin(&packet.info._login);
   i_SetString(packet.info._login._username, sizeof(packet.info._login._username), Username);
-  packet.info._login.hashtype = bhtDoubleMd5; /* Secure double MD5 hash */
+  packet.info._login.hashtype = bhtMd5; /* Secure MD5 hash */
   if ( sizeof(packet.info._login._passworddigest) < BLAKE_MD5HASHLEN ) {
     blake_word32_t params[] = {
       0, /* Will dynamically put the address in here in a second after initialisation, we have to do this to support compilers which enforce strict constant-initialisation rules */
     params[0] = (blake_word32_t)packet.info._login._passworddigest; /* Address of hash buffer */
     PANIC(BLAKESTOP_DDRP_HASHBUFF_TOO_SMALL, 3, params);
   }
+  #ifdef __GNUC__
+  # warning ("FIXME: Function is ignoring the login hash type and defaulting to MD5")
+  #endif /*__GNUC__*/
   blake_MD5SecureDoublePasswordHash(packet.info._login._passworddigest, Password, ChallengeDigest);
   memset(packet.info._login.reserved, 0, sizeof(packet.info._login.reserved)); /* Reserved things must always be zero */
   packet.info._login.clientid = (blake_word32_t)ClientID;

File blake/blakedb.c

 /*
-Copyright (C) 2001-2003 Daybo Logic.
+Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
   % David Duncan Ross Palmer <daybologic.co.uk/mailddrp>    %
   % R2 - Binary database                                    %
   % Created 25th February 2002                              %
-  % Last modified 27th June 2002                            %
+  % Last modified 19th January 2003                         %
   % By whom: DDRP                                           %
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 */
 #include "blakedb.h" /* Private header for initialisation/shutdown */
 /*-------------------------------------------------------------------------*/
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: blakedb.c,v 0.1 2002/06/27 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: blakedb.c,v 0.3 2003/02/20 17:13:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 
 struct db_node {
 #define HostToNet(rec) \
           RecordEndianConverter((rec), false)
 /*-------------------------------------------------------------------------*/
+#define HEADER_POSITION (0)
+
 #define INDEX_TO_OFFSET(index) \
-          ( (BLAKEDB_HEADERSZ) + ((BLAKEDB_USERSZ)*(index)) )
-
-#define HEADER_POSITION (0)
+          ( (HEADER_POSITION) + (BLAKEDB_HEADERSZ) + ((BLAKEDB_USERSZ)*(index)) )
 /*-------------------------------------------------------------------------*/
 bool blakedb_InternalInit()
 {
 {
   /* This is a bit messy but it does the job */
   char buff[( FILENAME_MAX * 2 ) + 8192];
-  const char* email[] = { BACKUP_EMAIL_ADDRESS_1, BACKUP_EMAIL_ADDRESS_2, BACKUP_EMAIL_ADDRESS_3 };
+  const char* email[] = { BACKUP_EMAIL_ADDRESS_1, BACKUP_EMAIL_ADDRESS_2 };
   unsigned int i;
 
   if ( strlen(DBFN) > FILENAME_MAX ) return false;
         if ( !ReadHandleData(DBH, &node) )
           return blakeBadObject;
 
+        rewind(node.filehandle);
         fseek(node.filehandle, INDEX_TO_OFFSET(UserIndex), SEEK_SET);
         blakedb_InitUser(PUserData, SizeOfUserData); /* Make sure it's all blank */
         if ( !node.filehandle ) return blakeDbAccessRead; /* File should have been locked open */
   struct db_node node;
   unsigned int newUserIndex;
   time_t registrationTime;
+  struct blakedb_Header header;
+  enum blakeError err;
 
   if ( !_inited ) return blakeNotStarted;
   if ( DBH == BLAKE_INVALID_HANDLE || !PNewUserDataIn ) return blakeInvalidParam;
 
-  time(&registrationTime); /* Record time NOW! */
   if ( !ReadHandleData(DBH, &node) )
     return blakeBadObject;
 
+  time(&registrationTime); /* Record time NOW! */
+
   newUserIndex = FindFreeUserSlot(DBH);
-  if ( newUserIndex == ~0 ) /* About to overflow the databae so say we're fukk even if it wastes one record */
+  if ( newUserIndex == 0 ) { /* First user? */
+    /* Write database header */
+    if ( !node.filehandle ) return blakeDbAccessWrite; /* File has not been locked open */
+    blakedb_InitHeader(&header);
+    err = blakedb_PutHeader(DBH, &header);
+    if ( err != blakeSuccess ) return err;
+  }
+  else if ( newUserIndex == ~0 ) /* About to overflow the database so say we're full even if it wastes one record */
     return blakeDbFull; /* The user database is full */
 
   /* Give user the index though their pointer */
 
   rewind(node.filehandle); /* Clear any error conditions */
   fseek(node.filehandle, INDEX_TO_OFFSET(newUserIndex), SEEK_SET); /* go to position of overwritable/new record */
+  printf("DEBUG:Sought to %lu (should be 256)\n", ftell(node.filehandle));
 
   PNewUserDataIn->Checksum = blakedb_Checksum16(PNewUserDataIn);
   HostToNet(PNewUserDataIn);
-  if ( WriteUser(node.filehandle, PNewUserDataIn) )
+  fflush(node.filehandle);
+  if ( WriteUser(node.filehandle, PNewUserDataIn) ) {
+    printf("DEBUG:Written user\n");
+    printf("DEBUG:Now it be %lu (should be > 256 or we're fucked)\n", ftell(node.filehandle));
     return blakeSuccess;
+  }
   return blakeDbFull; /* Can't write to the database */
 }
 /*-------------------------------------------------------------------------*/
   if ( !ReadHandleData(DBHandle, &node) )
     return blakeBadObject;
 
-  if ( !node.filehandle ) return blakeDbAccessWrite; /* File has not been locked open */
   rewind(node.filehandle);
   if ( fseek(node.filehandle, INDEX_TO_OFFSET(Index), SEEK_SET) == -1 )
     return blakeDbAccessWrite;
   return blakeSuccess;
 }
 /*-------------------------------------------------------------------------*/
+BLAKEAPI(enum blakeError) blakedb_PutHeader(BLAKE_DATABASE_HANDLE DBHandle, const struct blakedb_Header* PHeaderIn)
+{
+  struct db_node node;
+  struct blakedb_Header swappedHeader; /* Header in host-independent format */
+
+  if ( !blake_int_IsInited() ) return blakeNotStarted;
+  if ( DBHandle == BLAKE_INVALID_HANDLE || !PHeaderIn )
+    return blakeInvalidParam;
+  if ( !ReadHandleData(DBHandle, &node) )
+    return blakeBadObject;
+
+  swappedHeader = *PHeaderIn;
+
+  fseek(node.filehandle, HEADER_POSITION, SEEK_SET);
+  if ( !node.filehandle ) return blakeDbAccessWrite; /* File should have been locked open! */
+  HeaderEndianConverter(&swappedHeader, false); /* Convert to host-independent format */
+
+  if ( fwrite(&swappedHeader.Sig, sizeof(swappedHeader.Sig), 1, node.filehandle) < 1 ) return blakeDbAccessWrite;
+  if ( fwrite(&swappedHeader.Revision, sizeof(swappedHeader.Revision), 1, node.filehandle) < 1 ) return blakeDbAccessWrite;
+  if ( fwrite(&swappedHeader.Copyright, sizeof(swappedHeader.Copyright), 1, node.filehandle) < 1 ) return blakeDbAccessWrite;
+
+  printf("DEBUG:Written header\n");
+  return blakeSuccess;
+}
+/*-------------------------------------------------------------------------*/
+BLAKEAPI(enum blakeError) blakedb_InitHeader(struct blakedb_Header* PHeader)
+{
+  if ( !blake_int_IsInited() ) return blakeNotStarted;
+  if ( !PHeader ) return blakeInvalidParam;
+
+  PHeader->Sig = BLAKEDB_HEADER_SIG;
+  PHeader->Revision = BLAKEDB_HEADER_REVISION;
+  memset(PHeader->Copyright, 0, sizeof(PHeader->Copyright));
+  strncat(PHeader->Copyright, BLAKEDB_HEADER_COPYRIGHT, sizeof(PHeader->Copyright));
+
+  return blakeSuccess;
+}
+/*-------------------------------------------------------------------------*/
 BLAKEAPI(unsigned long int) blakedb_CountUsers(BLAKE_DATABASE_HANDLE DBHandle)
 {
   unsigned long int users = 0UL;
         if ( userData.Deleted ) {
           continue;
         }
-        if ( !userData.TimeOf.Registration ) /* End of DB */
+        if ( !userData.TimeOf.Registration ) { /* End of DB */
           loop = false;
+          continue;
+        }
 
         users++; /* Increase count of users */
         break;
     c = _handleData.linkList.Count(&_handleData.linkList);
     for ( i = 0U; i < c; i++ ) {
       struct db_node node;
+      bool found = false;
 
       _handleData.linkList.Get(&_handleData.linkList, i, &node);
+      blake_LockMutant(node.dblock);
       if ( node.dbhandle == DBHandle ) {
         if ( Lock )
-          blake_LockMutant(node.dblock);
+          err = ExclusiveOpen(node.fn, &node.filehandle);
         else
-          blake_UnlockMutant(node.dblock);
+          ExclusiveClose(&node.filehandle);
 
-        err = ExclusiveOpen(node.fn, &node.filehandle);
         _handleData.linkList.Set(&_handleData.linkList, i, &node);
-        break; /* No more matches are possible */
+        found = true;
       }
+      blake_UnlockMutant(node.dblock);
+      if ( found ) break;
     }
     UnlockData();
   }
   if ( fwrite(&PUserData->Online, sizeof(PUserData->Online), 1, FileStreamHandle) < 1 ) return false;
   if ( fwrite(&PUserData->Checksum, sizeof(PUserData->Checksum), 1, FileStreamHandle) < 1 ) return false;
   if ( fwrite(&PUserData->Space, sizeof(PUserData->Space), 1, FileStreamHandle) < 1 ) return false;
+  fflush(FileStreamHandle);
   return true;
 }
 /*-------------------------------------------------------------------------*/

File blake/res/GNUmakefile

 include ../../MasterMake.gnu
 
-ERASE=rm -f
+ERASE=perl ../../tools/erase.pl
 RAW2C=../../raw2c/raw2c
 MAKEC=$(CC) -c
 

File buildnum/GNUmakefile

 # Make for GNU tools.
 #
 
-all : buildnum
+include ../MasterMake.gnu
 
-buildnum : buildnum.c
-	gcc -ansi -pedantic -Wall -obuildnum buildnum.c
+ERASE=perl ../tools/erase.pl
+all : buildnum$(EXE)
+
+buildnum$(EXE) : buildnum$(C)
+	gcc -ansi -pedantic -Wall -obuildnum$(EXE) buildnum$(C)
 
 clean:
-	-rm -f buildnum
+	-$(ERASE) buildnum$(EXE)
 
 depend:
 	@echo No autodependencies

File buildnum/Makefile.bor

-# Simple make/clean for Borland C (32-bit)
-# for the OverChat server's auto incrementing build number global utility.
-# Maintainer- Overlord@DayboLogic.co.uk
-# (C)2001 Daybo Logic, all rights reserved.
-# http://www.daybologic.co.uk/overchat
-
-#
-# Constants
-#
-CC=bcc32                # Force 32-bit
-ERASE=..\rmw32\rmw32    # Custom deletion program compatible with UNIX rm
-
-all : buildnum
-
-buildnum : buildnum.exe
-
-buildnum.exe : buildnum.obj
-	$(CC) -ebuildnum.exe buildnum.obj
-
-buildnum.obj : buildnum.c
-	$(CC) -c -A -O2 buildnum.c
-
-clean:
-	$(ERASE) buildnum.obj buildnum.exe buildnum.bak
+# Simple make/clean for Borland C (32-bit)
+# for the OverChat server's auto incrementing build number global utility.
+# Maintainer- Overlord@DayboLogic.co.uk
+# (C)2001 Daybo Logic, all rights reserved.
+# http://www.daybologic.co.uk/overchat
+
+!include ../MasterMake.bor
+
+ERASE=perl ../tools/erase.pl
+
+ERASE_FILES=buildnum$(O) \
+            buildnum$(EXE) \
+            buildnum.bak \
+            buildnum.csm \
+            buildnum.tds
+
+
+all : buildnum
+
+buildnum : buildnum$(EXE)
+
+buildnum$(EXE) : buildnum$(O)
+	$(CC) -ebuildnum$(EXE) buildnum$(O)
+
+buildnum.obj : buildnum.c
+	$(CC) -c $(ANSI) $(OPTLEVEL) buildnum$(C)
+
+clean:
+	$(ERASE) $(ERASE_FILES)
+
+depend:
+	@echo No dependencies

File buildtimer/GNUmakefile

+# $Id: GNUmakefile,v 0.1 2003/02/08 21:10:00 ddrp Exp $
+#
+# Copyright (C) 2001-2003 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+#
 # Makefile for BuildTimer in the OverChat source tree
 # Uses GNU tools.
-# Maintainer = Overlord@DayboLogic.co.uk
+# Maintainer = David Duncan Ross Palmer <daybologic.co.uk/mailddrp>
 
-all : buildtimer
+include ../MasterMake.gnu
 
-buildtimer : buildtimer.c
-	@echo "Compiling/linking buildtimer"
-	@gcc -ansi -pedantic -Wall -obuildtimer buildtimer.c
+ERASE=perl ../tools/erase.pl
+
+
+all : buildtimer$(EXE)
+
+buildtimer$(EXE) : buildtimer$(C)
+	$(CC) $(ANSI) -obuildtimer$(EXE) buildtimer$(C)
 
 clean:
-	@echo "==> Cleaning buildtimer <=="
-	@-rm -f buildtimer buildtimer.core core overchat.stamp
+	-$(ERASE) buildtimer$(EXE) buildtimer.core core overchat.stamp
 
-start : buildtimer
+start : buildtimer$(EXE)
 	./buildtimer --start overchat.stamp
 
-stop : buildtimer overchat.stamp
+stop : buildtimer$(EXE) overchat.stamp
 	./buildtimer --stop overchat.stamp
 
 depend:

File buildtimer/Makefile.bor

+# $Id: Makefile.bor,v 0.1 2003/02/08 21:10:00 ddrp Exp $
+#
+# Copyright (C) 2001-2003 Daybo Logic.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the project nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+#
+# Makefile for BuildTimer in the OverChat source tree
+# Uses Borland tools.
+# Maintainer = David Duncan Ross Palmer <daybologic.co.uk/mailddrp>
+
+!include ../MasterMake.bor
+
+ERASE=perl ../tools/erase.pl
+
+ERASE_FILES=buildtimer$(EXE) \
+            buildtimer.core \
+            core \
+            overchat.stamp \
+            buildtimer.csm \
+            buildtimer.tds \
+            buildtimer.bak \
+            Makefile.bak \
+            GNUmakefile.bak
+
+all : buildtimer$(EXE)
+
+buildtimer$(EXE) : buildtimer$(C)
+	$(CC) $(ANSI) -obuildtimer$(EXE) buildtimer$(C)
+
+clean:
+	-$(ERASE) $(ERASE_FILES)
+
+start : buildtimer$(EXE)
+	./buildtimer --start overchat.stamp
+
+stop : buildtimer$(EXE) overchat.stamp
+	./buildtimer --stop overchat.stamp
+
+depend:
+	@echo "No autodependencies"

File buildtimer/buildtimer.c

     "fscked over",
     "bow down to the work of DDRP",
     "visit http://www.daybologic.co.uk/mailddrp/ and complain",
-    "courtesy of Daybo Logic"
+    "courtesy of Daybo Logic",
+    "does it always take this long?",
+    "bow to the developers",
+    "face East and bow to Mecca",
+    "did Dagsylad clobber the build tree again?",
+    "let\'s hope it\'s not Haesu\'s fault",
+    "praise be!",
+    "For new versions, visit http://freshmeat.net/projects/overchat/",
+    "let\'s hope dhass hasn\'t broken anything!",
+    "blame it on Jeff."
   };
   int index;
 

File c99.h/c99_stdbool.h

+/*
+$Id: c99_stdbool.h,v 0.1 2003/02/19 12:21:00 ddrp Exp $
+
+Copyright (C) 2001-2003 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  This is not the normal BOOL which I use, this is a direct replacement
+  for the ANSI C99 'bool' keyword if the system doesn't have stdbool.h yet
+
+  - DDRP <daybologic.co.uk/mailddrp>
+*/
+
+#ifndef __STDBOOL_H__
+#define __STDBOOL_H__ 1
+/*-------------------------------------------------------------------------*/
+/*
+  ANSI/ISO C++ says that bool, true & false are keywords.  That means
+  we can't touch them, they're keywords, we would be grilled alive for
+  an imortal offence to the nation!  Treason!  Unfortunately, old C++
+  (non-standard), didn't have the bool keyword and there's no way we can
+  tell if this version of C++ conforms, if C++ is being used we shall
+  not do any of this unless CPP_NO_bool_SUPPORT is defined.  You'll need
+  to do this in a Makefile or a config.h where tests have been done on
+  the compiler.  An autoconfigurator etc.
+*/
+
+#ifndef __bool_true_false_are_defined
+
+#if ( !defined(__cplusplus) || ( defined(__cplusplus) && defined(CPP_NO_bool_SUPPORT) ) )
+typedef enum {
+  false = 0,
+  true = 1
+} bool;
+
+/* I think these are so that people can test if they're defined */
+#define true true
+#define false false
+
+#endif /* __cplusplus) || (__cplusplus && CPP_NO_bool_SUPPORT) */
+
+#define __bool_true_false_are_defined (1)   /* I think ANSI requires this too */
+
+#endif /*!__bool_true_false_are_defined*/
+/*-------------------------------------------------------------------------*/
+#endif /*!__STDBOOL_H__*/

File c99.h/c99_stdint.h

+/*
+$Id: c99_stdint.h,v 0.2 2003/02/19 14:17:00 ddrp Exp $
+
+Copyright (C) 2001-2003 Daybo Logic.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+/*
+  These are a few of my replacements incase you have no stdint.h.  It is
+  not a complete replacement as I don't know the environment like the compiler
+  does, I don't know if your system can support 64-bit integers and such
+  like the _read_ stdint.h does, only use this if there is no proper C99
+  standard stdint.h.  This file should not be used if stdint.h or inttypes.h
+  have already been included because we have no standard way to tell if they
+  have so we will fail with redefinitions.  The macros that go with these
+  types should not ever be used anywhere in OverChat because, although the
+  standard (C99) says inttypes.h will include stdint.h, on FreeBSD etc.,
+  where there is no stdint.h at time of writing, inttypes.h won't make
+  them available.  Conclusion: If HAVE_STDINT_H, include stdint.h, if
+  HAVE_INTTYPES_H, include inttypes.h, if not fall back on this header.
+  Note: STDINT_NO_BASE_TYPES was invented by me, "base types" are defined
+  as anything which might be defined by inttypes.h.  This is quite useful
+  if you need things like int_least16_t but not the uint16_t types.
+    -- DDRP <daybologic.co.uk/mailddrp>
+*/
+
+#ifndef _STDINT_H
+#define _STDINT_H       1
+/*-------------------------------------------------------------------------*/
+/*
+  Some error checks before we begin
+*/
+/*
+  Some error checks before we begin the next definition
+*/
+# ifndef UINT_MAX
+#  error ("Must have ANSI compliant limits.h with UINT_MAX if not HAVE_STDINT_H")
+# endif /*!UINT_MAX*/
+
+# ifndef ULONG_MAX
+#  error ("Must have ANSI compliant limits.h with ULONG_MAX if not HAVE_STDINT_")
+# endif /*!ULONG_MAX*/
+
+# ifndef UCHAR_MAX
+#  error ("Must have ANSI compliant limits.h with UCHAR_MAX if not HAVE_STDINT_H")
+# endif /*!UCHAR_MAX*/
+
+# ifndef SHRT_MAX
+#  error ("Must have ANSI compliant limits.h with SHRT_MAX if not HAVE_STDINT_H")
+# endif /*!SHRT_MAX*/
+
+# ifndef INT_MAX
+#  error ("Must have ANSI compliant limits.h with INT_MAX if not HAVE_STDINT_H")
+# endif /*!INT_MAX*/
+
+# ifndef LONG_MAX
+#  error ("Must have ANSI compliant limits.h with LONG_MAX is not HAVE_STDINT_H")
+# endif /*!LONG_MAX*/
+
+/*
+  Declaration of my backup uint8_t (backup 8 bit integer)
+*/
+# ifndef STDINT_NO_BASE_TYPES
+#  if ( UCHAR_MAX == 255 )
+    typedef unsigned char uint8_t;
+#  else
+#   error ("unsigned char is not 8bits, define HAVE_STDINT_H?")
+#  endif
+# endif /*!STDINT_NO_BASE_TYPES*/
+
+/*
+  Declaration of my backup version of uint32_t, 32-bit integer
+*/
+# ifndef STDINT_NO_BASE_TYPES
+#  if ( ULONG_MAX == 0xFFFFFFFFUL )
+    typedef unsigned long uint32_t;
+#  elif ( UINT_MAX == 0xFFFFFFFFU ) /* 64-bit word it seems */
+    typedef unsigned int uint32_t;
+#  else
+#   error ("Cannot determine a definitive uint32_t")
+#  endif
+# endif /*!STDINT_NO_BASE_TYPES*/
+
+/*
+  Declaration of int_least16_t (at least 16 bits)
+*/
+# if ( SHRT_MAX >= 0x7FFF )
+   typedef signed short int int_least16_t;
+# elif ( INT_MAX >= 0x7FFF )
+   typedef signed int int_least16_t;
+# elif ( LONG_MAX >= 0x7FFF )
+   typedef signed long int int_least16_t;
+# else
+#  error ("No known type is at least 16-bits neccersary for int_least16_t")
+# endif
+/*-------------------------------------------------------------------------*/
+#endif /*!_STDINT_H*/

File cgi-bin/GNUmakefile

 #  # When adding utilities, please modify the rules   #
 #  # in all Makefiles in the directory to ensure they #
 #  # are built with the tree.  Send patches to the    #
-#  # Makefiles to Overlord@DayboLogic.co.uk           #
+#  # Makefiles to daybologic.co.uk/mailddrp           #
 #  ####################################################
 #
 
 include ../MasterMake.gnu
 
-ERASE=../rmw32/rmw32
-IPATH=-I../src -I../blake
+ERASE=perl ../tools/erase.pl
+IPATH=-I../src -I../blake -I../c99.h
 CFLGS=-c -ansi -pedantic -Wall -g $(IPATH)
 
 all : _cgihelp _ocreg

File cgi-bin/cgihelp.c

 /*
-Copyright (C) 2001-2003 Daybo Logic.
+Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 #include "cgihelp.h"
 /*-------------------------------------------------------------------------*/
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: cgihelp.c,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: cgihelp.c,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 
 static char* FindChrByURLRFC(char* URLStr, unsigned char CharNum);

File cgi-bin/ocreg/GNUmakefile

 include ../../MasterMake.gnu
 
 
-RM=rm -f
-COMPILE=$(CC) -c $(ANSI) $(CFLAGS) -I../../src -I../../blake -I..
+RM=perl ../../tools/erase.pl
+COMPILE=$(CC) -c $(ANSI) $(CFLAGS) -I../../src -I../../blake -I.. -I../../c99.h
 LINK=$(CPPC) $(CFLAGS) -o
 LIBS=../../libblake$(LIB) ../../dpcrtlmm/libdpcrtlmm$(LIB) ../../dlini/libdlini$(LIB) ../../daybocrypt/libdaybocrypt$(LIB) ../../rttb/lib/librttb$(LIB)
 
-IPATH=-I../../src
+IPATH=-I../../src -I../../c99.h
 TARGET=ocreg
 
 all : $(TARGET)

File cgi-bin/ocreg/ocreg.c

 /*
-Copyright (C) 2001-2003 Daybo Logic.
+Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 #include "cgihelp.h"
 
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: ocreg.c,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: ocreg.c,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 
 static void StartCGI(void);
       ScriptError("The chosen nickname is too long, please call yourself something we will remember you with!");
       return false;
     }
-    
+
     sprintf(blah, "The chosen nickname contains an illegal character \'%c\', don\'t begin with spaces or use nothing but spaces either.", invChr);
     ScriptError(blah);
     return false;

File cgi-bin/ocreg/typescript

-Script started on Sun Sep 29 18:54:33 2002
-[overlord@torvalds ocreg]$ gmake -f Makefile.hnu    g .gnu
-gcc -ansi -pedantic -Wall  -I../../src -I../../blake -I.. ocreg.c
-ocreg.c: In function `MailPassword':
-ocreg.c:329: warning: implicit declaration of function `execl'
-/tmp/ccORuBsu.o: In function `main':
-/tmp/ccORuBsu.o(.text+0x34): undefined reference to `blake_Init'
-/tmp/ccORuBsu.o(.text+0x34): relocation truncated to fit: R_PPC_REL24 blake_Init
-/tmp/ccORuBsu.o(.text+0xd0): undefined reference to `cgihelp_ExtractCGIQuery'
-/tmp/ccORuBsu.o(.text+0xd0): relocation truncated to fit: R_PPC_REL24 cgihelp_ExtractCGIQuery
-/tmp/ccORuBsu.o(.text+0x10c): undefined reference to `cgihelp_ExtractCGIQuery'
-/tmp/ccORuBsu.o(.text+0x10c): relocation truncated to fit: R_PPC_REL24 cgihelp_ExtractCGIQuery
-/tmp/ccORuBsu.o(.text+0x160): undefined reference to `cgihelp_RFCURL_RecoverAll'
-/tmp/ccORuBsu.o(.text+0x160): relocation truncated to fit: R_PPC_REL24 cgihelp_RFCURL_RecoverAll
-/tmp/ccORuBsu.o(.text+0x170): undefined reference to `cgihelp_RFCURL_RecoverSpaces'
-/tmp/ccORuBsu.o(.text+0x170): relocation truncated to fit: R_PPC_REL24 cgihelp_RFCURL_RecoverSpaces
-/tmp/ccORuBsu.o(.text+0x180): undefined reference to `cgihelp_RFCURL_RecoverAll'
-/tmp/ccORuBsu.o(.text+0x180): relocation truncated to fit: R_PPC_REL24 cgihelp_RFCURL_RecoverAll
-/tmp/ccORuBsu.o(.text+0x21c): undefined reference to `blakedb_CreateDBHandle'
-/tmp/ccORuBsu.o(.text+0x21c): relocation truncated to fit: R_PPC_REL24 blakedb_CreateDBHandle
-/tmp/ccORuBsu.o(.text+0x250): undefined reference to `blakedb_LockDatabase'
-/tmp/ccORuBsu.o(.text+0x250): relocation truncated to fit: R_PPC_REL24 blakedb_LockDatabase
-/tmp/ccORuBsu.o(.text+0x398): undefined reference to `blakedb_UnlockDatabase'
-/tmp/ccORuBsu.o(.text+0x398): relocation truncated to fit: R_PPC_REL24 blakedb_UnlockDatabase
-/tmp/ccORuBsu.o(.text+0x3ac): undefined reference to `blakedb_DestroyDBHandle'
-/tmp/ccORuBsu.o(.text+0x3ac): relocation truncated to fit: R_PPC_REL24 blakedb_DestroyDBHandle
-/tmp/ccORuBsu.o(.text+0x3cc): undefined reference to `blake_Cleanup'
-/tmp/ccORuBsu.o(.text+0x3cc): relocation truncated to fit: R_PPC_REL24 blake_Cleanup
-/tmp/ccORuBsu.o: In function `ValidateEmail':
-/tmp/ccORuBsu.o(.text+0x620): undefined reference to `network_IsZeroIP'
-/tmp/ccORuBsu.o(.text+0x620): relocation truncated to fit: R_PPC_REL24 network_IsZeroIP
-/tmp/ccORuBsu.o: In function `PrintBlakeError':
-/tmp/ccORuBsu.o(.text+0x768): undefined reference to `blake_GetErrorMessage'
-/tmp/ccORuBsu.o(.text+0x768): relocation truncated to fit: R_PPC_REL24 blake_GetErrorMessage
-/tmp/ccORuBsu.o(.text+0x7b8): undefined reference to `blake_GetErrorMessage'
-/tmp/ccORuBsu.o(.text+0x7b8): relocation truncated to fit: R_PPC_REL24 blake_GetErrorMessage
-/tmp/ccORuBsu.o: In function `NickInUse':
-/tmp/ccORuBsu.o(.text+0x844): undefined reference to `blakedb_GetUserData'
-/tmp/ccORuBsu.o(.text+0x844): relocation truncated to fit: R_PPC_REL24 blakedb_GetUserData
-/tmp/ccORuBsu.o(.text+0x888): undefined reference to `blake_NickCompare'
-/tmp/ccORuBsu.o(.text+0x888): relocation truncated to fit: R_PPC_REL24 blake_NickCompare
-/tmp/ccORuBsu.o: In function `CreateUser':
-/tmp/ccORuBsu.o(.text+0x900): undefined reference to `blakedb_InitUser'
-/tmp/ccORuBsu.o(.text+0x900): relocation truncated to fit: R_PPC_REL24 blakedb_InitUser
-/tmp/ccORuBsu.o(.text+0x974): undefined reference to `blakedb_CreateUser'
-/tmp/ccORuBsu.o(.text+0x974): relocation truncated to fit: R_PPC_REL24 blakedb_CreateUser
-/tmp/ccORuBsu.o: In function `GenPassword':
-/tmp/ccORuBsu.o(.text+0x9f8): undefined reference to `blake_RandPass'
-/tmp/ccORuBsu.o(.text+0x9f8): relocation truncated to fit: R_PPC_REL24 blake_RandPass
-/tmp/ccORuBsu.o: In function `NickTest':
-/tmp/ccORuBsu.o(.text+0xb58): undefined reference to `blake_NickTest'
-/tmp/ccORuBsu.o(.text+0xb58): relocation truncated to fit: R_PPC_REL24 blake_NickTest
-collect2: ld returned 1 exit status
-gmake: *** [ocreg.o] Error 1
-[overlord@torvalds ocreg]$ exit
-
-Script done on Sun Sep 29 18:54:39 2002

File clients/oberchatten/AboutUnit.cpp

 # pragma hdrstop
 #endif //HDRSTOP
 
+#include "ddrptype.h"
 #include "blake.h"
 #include "AboutUnit.h"
 #include "../../src/server_version.h"
 TAboutForm *AboutForm;
 
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: AboutUnit.cpp,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: AboutUnit.cpp,v 0.2 2003/02/19 22:08:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 //---------------------------------------------------------------------------
 __fastcall TAboutForm::TAboutForm(TComponent* Owner)

File clients/oberchatten/Events.h

 /*
-$Id: Events.h,v 0.1 2003/01/29 00:00:00 ddrp Exp $
+$Id: Events.h,v 0.1 2003/02/04 05:33:00 ddrp Exp $
 
 Copyright (C) 2001-2003 Daybo Logic.
 All rights reserved.
       char From[OVERCHAT_NICK_LIMIT+1];
       time_t When;
       enum blakeCipherID CipherID;
+      blake_word8_t Flags1;
       char* DynamicMessage;
     } Msg;
 

File clients/oberchatten/MainFormUnit.cpp

 #  pragma hdrstop
 #endif //HDRSTOP
 
+#include "ddrptype.h"
 #include "master.h"
 #include "Events.h"
 #include "NetworkOptionsUnit.h"
 TMainForm *MainForm;
 
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: MainFormUnit.cpp,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: MainFormUnit.cpp,v 0.2 2003/02/19 22:08:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 
 struct guiRoomInfo {
       msgForm->AddToConversation(PMessageEvent->eventData.Msg.When,
                                  remoteUser,
                                  message,
-                                 PMessageEvent->eventData.Msg.CipherID
+                                 PMessageEvent->eventData.Msg.CipherID,
+                                 PMessageEvent->eventData.Msg.Flags1
       );
     }
   }

File clients/oberchatten/MsgUnit.cpp

 # pragma hdrstop
 #endif //HDRSTOP
 
+#include "ddrptype.h"
 #include "blake.h"
 #include "Events.h"
 #include "MsgUnit.h"
 using namespace Oberchatten;
 
 #ifdef OVERCHAT_RCS_STAMPS
-static char rcsid[] = "$Id: MsgUnit.cpp,v 0.1 2003/01/29 00:00:00 ddrp Exp $";
+static char rcsid[] = "$Id: MsgUnit.cpp,v 0.1 2003/02/04 05:30:00 ddrp Exp $";
 #endif /*OVERCHAT_RCS_STAMPS*/
 //---------------------------------------------------------------------------
 __fastcall TMsgForm::TMsgForm(TComponent* Owner)
   MainForm->Whois(remoteUserName);
 }
 //---------------------------------------------------------------------------
-void TMsgForm::AddToConversation(const time_t When, const char* UserName, const char* NewComment, const enum blakeCipherID CipherID)
+void TMsgForm::AddToConversation(const time_t When, const char* UserName, const char* NewComment, const enum blakeCipherID CipherID, const blake_word8_t Flags1)
 {
   const AnsiString un(UserName);
   const AnsiString nc(NewComment);
 
-  AddToConversation(When, un, nc, CipherID);
+  AddToConversation(When, un, nc, CipherID, Flags1);
 }
 //---------------------------------------------------------------------------
-void TMsgForm::AddToConversation(const time_t When, const AnsiString& UserName, const AnsiString& NewComment, const enum blakeCipherID CipherID)
+void TMsgForm::AddToConversation(const time_t When, const AnsiString& UserName, const AnsiString& NewComment, const enum blakeCipherID CipherID, const blake_word8_t Flags1)
 {
   const char me[] = "/me ";
   const char unofficialkill[] = "/unofficialkill";
     MessageBeep(0xFFFFFFFF);
 
   // Hmm, if this message has been received from the remote user
-  // _and_ we're away, send them an away message
-  if ( remoteUserName == UserName && AwayMessageDlg->IsAway() )
+  // _and_ we're away, _and_ it's not a notice send them an away notice
+  if ( remoteUserName == UserName && AwayMessageDlg->IsAway() && !(Flags1 & BLAKEMESSAGE_FLAGS1_NOTICE) )
     AwayMessage();