summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES106
-rwxr-xr-x[-rw-r--r--]COPYING0
-rw-r--r--CVS/Entries14
-rwxr-xr-xMakefile77
-rw-r--r--NEWS8
-rwxr-xr-xREADME478
-rw-r--r--RELEASES52
-rw-r--r--SNAPSHOT2
-rw-r--r--TODO78
-rw-r--r--VERSION2
-rwxr-xr-xconfigure1758
-rw-r--r--etc/CVS/Entries2
-rw-r--r--etc/ychat.conf25
-rw-r--r--html/CVS/Entries2
-rwxr-xr-x[-rw-r--r--]html/favicon.icobin2238 -> 2238 bytes
-rwxr-xr-xhtml/frameset.html6
-rwxr-xr-xhtml/help.html17
-rwxr-xr-xhtml/index.html44
-rwxr-xr-xhtml/input.html51
-rwxr-xr-xhtml/notfound.html4
-rwxr-xr-xhtml/online.html22
-rwxr-xr-xhtml/stream.html42
-rwxr-xr-x[-rw-r--r--]html/style.css45
-rw-r--r--scripts/CVS/Entries7
-rwxr-xr-xscripts/astyle.sh3
-rw-r--r--scripts/makeyhttpd.pl87
-rwxr-xr-xscripts/stats.pl2
-rw-r--r--src/CVS/Entries32
-rwxr-xr-xsrc/Makefile.in34
-rw-r--r--src/chat/CVS/Entries10
-rwxr-xr-xsrc/chat/chat.cpp13
-rwxr-xr-xsrc/chat/chat.h4
-rwxr-xr-xsrc/chat/room.cpp3
-rwxr-xr-xsrc/chat/room.h7
-rwxr-xr-xsrc/chat/user.cpp4
-rw-r--r--src/cli/CVS/Entries4
-rwxr-xr-xsrc/cli/cli.cpp11
-rwxr-xr-xsrc/cli/cli.h11
-rw-r--r--src/conf/CVS/Entries4
-rwxr-xr-xsrc/conf/conf.cpp15
-rwxr-xr-xsrc/conf/conf.h3
-rwxr-xr-xsrc/configure1805
-rw-r--r--src/data/CVS/Entries8
-rw-r--r--src/data/data.cpp4
-rw-r--r--src/data/data.h4
-rw-r--r--src/data/data_base.cpp2
-rw-r--r--src/data/data_base.h2
-rwxr-xr-xsrc/glob.h218
-rwxr-xr-xsrc/html.cpp131
-rwxr-xr-xsrc/html.h36
-rwxr-xr-xsrc/incl.h19
-rwxr-xr-xsrc/logd.cpp8
-rwxr-xr-xsrc/logd.h4
-rwxr-xr-xsrc/main.cpp197
-rw-r--r--src/maps/CVS/Entries14
-rw-r--r--src/maps/hash.cpp26
-rw-r--r--src/maps/hash.h18
-rw-r--r--src/maps/hashmap.h47
-rw-r--r--src/maps/hashmap.tmpl100
-rw-r--r--src/maps/nhashmap.h12
-rw-r--r--src/maps/nhashmap.tmpl6
-rw-r--r--src/maps/shashmap.h31
-rw-r--r--src/maps/shashmap.tmpl100
-rwxr-xr-xsrc/modl.cpp8
-rwxr-xr-xsrc/modl.h1
-rw-r--r--src/mods/commands/CVS/Entries4
-rw-r--r--src/mods/commands/Makefile2
-rwxr-xr-xsrc/mods/commands/Makefile.in2
-rw-r--r--src/mods/html/CVS/Entries16
-rw-r--r--src/mods/html/Makefile2
-rwxr-xr-xsrc/mods/html/Makefile.in2
-rw-r--r--src/mods/html/yc_admin.cpp2
-rwxr-xr-xsrc/mods/html/yc_colors.cpp8
-rwxr-xr-xsrc/mods/html/yc_help.cpp4
-rwxr-xr-xsrc/mods/html/yc_loggedin.cpp2
-rwxr-xr-xsrc/mods/html/yc_options.cpp12
-rwxr-xr-xsrc/mods/html/yc_register.cpp14
-rwxr-xr-xsrc/msgs.h145
-rwxr-xr-xsrc/name.cpp34
-rwxr-xr-xsrc/name.h20
-rw-r--r--src/ncur/CVS/Entries4
-rwxr-xr-xsrc/ncur/ncur.cpp12
-rwxr-xr-xsrc/ncur/ncur.h5
-rwxr-xr-xsrc/reqp.cpp464
-rwxr-xr-xsrc/reqp.h48
-rw-r--r--src/sock/CVS/Entries4
-rwxr-xr-xsrc/sock/sock.cpp40
-rwxr-xr-xsrc/sock/sock.h25
-rw-r--r--src/thrd/CVS/Entries8
-rwxr-xr-xsrc/thrd/pool.cpp245
-rwxr-xr-xsrc/thrd/pool.h65
-rw-r--r--src/thrd/thro.cpp1
-rw-r--r--src/thrd/thro.h2
-rw-r--r--src/time/CVS/Entries2
-rwxr-xr-xsrc/time/timr.cpp3
-rwxr-xr-xsrc/wrap.cpp85
-rwxr-xr-xsrc/wrap.h12
97 files changed, 2372 insertions, 4812 deletions
diff --git a/CHANGES b/CHANGES
index ca43577..4bf7178 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,15 +1,97 @@
-Changes from 0.5.3-LEGACYRELEASE to 0.5.4-STABLERELEASE
-- Backported reqp::get_url from yChat 0.7.8-CURRENT.
-- Tagged 0.5-STABLE
+Changes from 0.7.6-RELEASE to 0.7.7-RELEASE
+- Major code cleanup
+- Bugfix in /col
+- Bugfix in gcol #1 (destroy session also if no database is used)
+- Bugfix in gcol #2 (now runs each hour not once a day)
+- Renew the style.css and stream.html
-Changes from 0.5.2-LEGACYRELEASE to 0.5.3-LEGACYRLEASE
-- Code cleanup
-- Added ./scripts/*
-- Added gmake stats option
+Changes from 0.7.5-RELEASE to 0.7.6-RELEASE
+- Removed the old hash maps and included the SGI C++ STL extenstion
+ hash_map.
-Changes from 0.5.1-RELEASE to 0.5.2-LEGACYRLEASE
-- Changed this branch into a LEGACY branch.
-- Rewrote the dynamic thread pool (backport from 0.7.8-CURRENT).
-- Added scripts/*
-- Code now uses ANSI C++ style with 2 space code indenting.
+Changes from 0.7.4.1-RELEASE to 0.7.5-RELEASE
+- Garbage collector will now run once a hour rather than each ten minutes.
+- Dynamic thread pool improvements.
+- Removed equiv-http-refresh meta tag from the online list.
+- Minor bugfix in the /topic command.
+- Implemented "User list"
+Changes from 0.7.4-RELEASE to 0.7.4.1-RELEASE:
+- Dynamic thread pool bugfix (dead lock)
+
+Changes from 0.7.3-RELEASE to 0.7.4-RELEASE:
+- Code cleanup.
+- Made the thread pool increasing dynamic.
+- Added some thread pool optimazions.
+- Added some more ${MAKE} vars to the Makefiles.
+- Added Content-length to the HTTPD header.
+- Added the !command to the command line interface.
+- Added Content-type text/plain.
+- Added scrolling checkbox to input.html
+- Removed modl from yhttpd. Dynamic modules are not needed in yhttpd yet.
+- Improved session engine.
+- Fixed auto logout bug.
+- Fixed newline bug (one \n too much for each html template)
+- Logging can now be completely disabled.
+
+Changes from 0.7.2 to 0.7.3-RELEASE:
+- Added FreeBSD 5.3-RELEASE support.
+- Added chat.enableguest option.
+- Added the /all command (Global system message)
+- Renamed the /getstatus command into /about.
+- Fixed the &-bug (& should be allowed in messages). \AND is now a
+ synonym for & too.
+- Fixed the /msg bug (In /msg the string replacer should be activated).
+- Fixed logging bug (do not log any timestamps if there are no messages).
+
+Changes from 0.7.1 to 0.7.2-RELEASE:
+New features:
+- /morph
+- Added the new standard html template design.
+Bugfixes:
+- /away prints a . instead of a : if no away reason is given.
+- /ko message was wrong. Displayed not room name of the user to be kicked out.
+- /invisible command displayed wrong private messages.
+- /getstatus had no help text.
+- /msg and /s should now print the system time if printalwaystime == true.
+- Added a blank to the /uptime message.
+- /topic now prints the topic in the user's color.
+- Fixed some typos.
+
+Changes from 0.7.0 to 0.7.1-RELEASE:
+- Added ${MAKE} to the config file because some Linux distros dont use
+ the "gmake" command for GNU make but just "make"! Modified the
+ configure script to generate a make.version file.
+- Removed some typos from the ychat.conf.
+- Fixed the auto away message. This one will be posted in the room
+ as public rather than only private to the auto-away-user.
+- Fixed some documentation stuff for yhttpd because yhttpd does not
+ need MySQL at all.
+- Added the chat.maxlength.word option.
+
+Changes from 0.6 to 0.7.0-RELEASE:
+- Better stability
+- Better performance (using more hmaps)
+- HTML color switcher menu
+- New commands: /away /room /j /ren
+- Simple garbage collector for old user and room objects
+- Use of the database (MySQL)
+- Nick registration and password protection
+- Status images for Operator, Half-Operator, Voiced user and Guests
+- New Makefiles
+- Useful Perl scripts for sourcecode stats generation etc.
+- Added system_log and room logging to access_log logging
+- Added time-offset option
+- Added to the admin interface new options
+- Added Logout button
+- Added string replacer there certain substr. of postings will be replaced by another string (such as smiley images)
+- Added Superuser levels and the /ko and /set commands
+- Added admin CLI (Command Line Interface) mode
+- Added memory rusage history which tracks memory usage for the last 10 days
+- Added HTTP POST request parsing
+- Made yChat more modular so yhttpd can be extracted from it (scripts/makeyhttpd.pl)
+- Added CGI support
+- Rewrote big parts of the Makefiles and the configure scripts
+- Made it compatible to GNU G++ 3.4, 3.3, 3.2 and 3.1 (3.0 and earlier does not work)
+- XML based configuration file (ychat.conf)
+- Added default operator option: chat.defaultop
diff --git a/COPYING b/COPYING
index a43ea21..a43ea21 100644..100755
--- a/COPYING
+++ b/COPYING
diff --git a/CVS/Entries b/CVS/Entries
index 5c1d2f7..dc0de3d 100644
--- a/CVS/Entries
+++ b/CVS/Entries
@@ -1,10 +1,10 @@
-/CHANGES/1.37/Thu Mar 10 22:01:54 2005//
+/CHANGES/1.21/Mon Feb 21 02:02:48 2005//
/COPYING/1.6/Sun Jun 27 06:32:26 2004//
/INSTALL/1.7/Fri Jul 9 22:33:20 2004//
-/Makefile/1.36/Sun Mar 6 23:40:15 2005//
-/NEWS/1.44/Thu Mar 10 22:01:54 2005//
-/README/1.120/Thu Mar 10 22:01:54 2005//
-/RELEASES/1.17/Mon Mar 7 22:41:12 2005//
-/TODO/1.75/Sat Mar 5 00:15:23 2005//
-/configure/1.34/Fri Mar 4 21:00:44 2005//
+/Makefile/1.31/Sun Feb 13 07:56:58 2005//
+/NEWS/1.35/Mon Feb 21 02:02:48 2005//
+/README/1.104/Mon Feb 21 02:02:48 2005//
+/RELEASES/1.2/Thu Feb 17 18:09:42 2005//
+/TODO/1.69/Fri Feb 18 14:40:56 2005//
+/configure/1.31/Wed Feb 9 22:42:58 2005//
D
diff --git a/Makefile b/Makefile
index 3bed77d..e0b6e07 100755
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,84 @@
-MAKE=gmake
-all: base
- @echo "Now edit the ./conf.txt file and run ./ychat!"
- @echo WARNING! This software is EXPERIMENTAL!
+MAKE=`tail -n 1 make.version`
+PREFIX=`grep "define PREFIX" src/glob.h | cut -d'"' -f2`
+all: version base modules version
+ @echo "Now edit the ychat.conf and run ychat!"
+ @echo "The config file is searched in the following order:"
+ @echo " ./ychat.conf "
+ @echo " ~/.ychat/ychat.conf "
+ @echo " ./etc/ychat.conf "
+ @echo " /etc/ychat.conf "
+ @echo " $(PREFIX)/etc/ychat.conf "
+ @echo If you want to help the yChat project please run gmake mail
+ @echo so that the developers receive an email about the platform
+ @echo being used.
+mail:
+ @echo "VERSION:" > mail.tmp
+ @${MAKE} version >> mail.tmp
+ @echo >> mail.tmp
+ @echo "UNAME:" >> mail.tmp
+ @uname -a >> mail.tmp
+ @echo >> mail.tmp
+ @echo "DATE:" >> mail.tmp
+ @date >> mail.tmp
+ @echo >> mail.tmp
+ @echo "COMPILER AND MAKE:" >> mail.tmp
+ @cat g++.version make.version >> mail.tmp
+ @cat mail.tmp | mail -s "Successfull build of yChat" successfullbuild@yhttpd.org
+ @rm -f mail.tmp
install: deinstall
uninstall: deinstall
deinstall:
@echo Install/deinstall is not supported!
- @echo Start yChat with ./ychat instead!
+ @echo Start yChat with ./bin/ychat instead!
@exit 1
+modules:
+ @if test -d ./src/mods; then ${MAKE} -C ./src/mods; fi
+clean_modules:
+ @if test -d ./src/mods; then ${MAKE} -C ./src/mods clean; fi
base:
+ @if test -f bin/ychat; then echo "Backing up old binary";if test -f bin/ychat.old; then rm -f bin/ychat.old; fi; mv bin/ychat bin/ychat.old; fi
+ @perl ./scripts/buildnr.pl
+ @perl ./scripts/setglobvals.pl
@${MAKE} -C ./src
clean_base:
@${MAKE} -C ./src clean
stats:
@perl scripts/stats.pl
run:
- ./ychat
+ ./bin/ychat
+base_start: base
+ ./bin/ychat
+start: base modules
+ ./bin/ychat
gpl:
@more COPYING
-clean: clean_base
+#//<<*
+yhttpdbase:
+ @perl scripts/makeyhttpd.pl || echo "You need to have perl to do this!"
+ @echo yhttpd code base has been generated in ../yhttpd
+#//*>>
+clean: clean_base clean_modules
+help:
+ @echo "You may run ${MAKE} with the following parameters:"
+ @grep "^ ${MAKE} " README
+ @echo "For more questions read the README file or contact mail@ychat.org!"
+setup:
+ @./configure
+ @${MAKE}
+config:
+ @sh -c "scripts/config.sh"
+ @echo If you run ${MAKE} config from the command line then you may need
+ @echo to rerun ./configure and recompile all now!
+
+mrproper: clean
+ @if test -f src/glob.h.org; then mv -f src/glob.h.org src/glob.h;fi
+ @if test -f g++.version; then rm -f g++.version; fi
+ @if test -f make.version; then rm -f make.version; fi
+ @if test -f src/Makefile; then rm -f src/Makefile; fi
+ @if test -d src/mods; then find src/mods/*/ -name Makefile | xargs rm -f; fi
+ @find . -name "*.add" | xargs rm -f
+ @ls | grep core | xargs rm -f
+version:
+ @./scripts/version.sh
debug:
- @gdb ./ychat ychat.core
+ @gdb bin/ychat ychat.core
diff --git a/NEWS b/NEWS
index 85755c3..f255184 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,4 @@
-::(07.04.05)::Released yChat 0.7.9.1. This release only includes some minor bugfixes. The ychat.conf file is now valid XML. Also some typos have been fixed.
-::(10.03.05)::Released yChat 0.7.9. The logging capability has been improved. All chat command requests will be logged. The ncurses interface has been improved. Some code has been cleaned up.
-::(07.03.05)::Released yChat 0.5.4. This is a STABLERELEASE. The HTTP parsing methods have been backported from yChat 0.7.8. Also some minor bugfixes were made.This is the first STABLERELEASE of yChat ever.
-::(05.03.05)::Released yChat 0.7.8. This release includes an IP cache for more speed. An UNIX signal catcher class has been added. SIGUSR1 and SIGUSR2 now clean the template cache or reload all dynamic modules. Added "Allow" to the HTTPD header. Also, lots of Bugfixes and minor improvements were made. Changed the 0.5 branch into STABLE. The 0.5.4-STABLERELEASE will follow next week. The ychat-stable CVS branch has been opened, which now points to ychat-0.5.
-::(02.03.05)::Released yChat 0.5.3. This is a LEGACYRELEASE. It includes a stats generation script located in the scripts/ directory which can be called by gmake stats. Also all the sources have been moved to ./src. Some minor bugfixes are included also.
-::(27.02.05)::Released yChat 0.5.2. This is a LEGACYRELEASE. That means, that this version is not official supported. The 0.5.2 version might be interesting by developers who want to have a clean base structure of an existing C++ based chat system. The 0.5.2 version does not have any features besides logging in and single room chatting. Multi rooms can be added easily.
-::(24.02.05)::Released yChat 0.7.7.1. This release only includes a yChat startup bugfix.
+::(21.02.05)::Released yChat 0.7.7. A major code cleanup has been made and the ANSI code formating is now being used. Bugfixes in the timer thread have been made and the standard demo HTML style has been renewed.
::(17.02.05)::Released yChat 0.7.6. This release now uses the hash_map class from the SGI STL extension which is more stable then the old Hash Map used by yChat.
::(14.02.05)::Released yChat 0.7.5. The garbage collector will now run once a hour. The dynamic thread pool has been improved. Removed thre equiv-http-refresh meta tag from the online list. Added a minor bugfix in the /topic command. Implemented an HTML based list of all logged in users and the /users command which does the same.
::(13.02.05)::Released yChat 0.7.4.1 This new version includes a major bugfix made in the new dynamic thread pool which has been introdouced in 0.7.4. The bug resulted in a thread pool dead lock.. Tagged yChat 0.7.5-CURRENT into CVS.
diff --git a/README b/README
index af88206..038c4f6 100755
--- a/README
+++ b/README
@@ -1,7 +1,8 @@
-yChat++; Homepage: www.yChat.org; Version 0.6
+yChat; Homepage: www.yChat.org; Version 0.7.7-RELEASE
+
Copyright (C) 2003 Paul C. Buetow, Volker Richter
+Copyright (C) 2004, 2005 Paul C. Buetow
-----------------------------------------------------------------
-
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
@@ -15,94 +16,297 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-----------------------------------------------------------------
-0.0.0 YCHAT++ TABLE OF CONTENTS
+YCHAT TABLE OF CONTENTS:
+
+0.0.0 YCHAT FEATURES //<<
1.0.0 REQUIREMENTS
1.1.0 TESTED PLATFORMS
-1.2.0 IMPORTANT NOTES
-1.3.0 HOW TO OBTAIN YCHAT++
+1.2.0 IMPORTANT NOTICES
+1.3.0 HOW TO OBTAIN YCHAT
1.3.1 INSTALLATION
-1.4.0 HOW TO USE SCREEN WITH YCHAT++
+1.3.2 INSTALLATION QUICK-START
+1.3.3 MYSQL SETUP //<<
+1.4.0 HOW TO USE SCREEN WITH YCHAT
1.5.0 CUSTOMIZATION
1.6.0 FILES
+1.7.0 WRITING BUG REPORTS
1.8.0 CONTACT
+1.9.0 YHTTPD CODE BASE GENERATION //<<
+
+//<<*
+0.0.0 YCHAT FEATURES
+
+- Its free & portable -
+yChat is developed under the GNU general public license and is based on GNU
+tools (gcc, gmake), other open source library stuff (such as libncurses etc.)
+and should run on any POSIX capable operating system (such as all Linux based
+systems, FreeBSD, NetBSD, OpenBSD and other BSD-Systems and on UNICES like
+IRIX, HP-UX, Solaris etc.).
+
+- There is no need for special chat clients -
+yChat is web based, that means clients may only connect to the chat server
+with an normal web browser such as Microsoft Internet Explorer or any Gecko-
+Engine powerd browsers like Mozilla, Firefox, Camino etc.
+
+- It has features of a real HTTP webserver -
+yChat runs completely stand alone and does not need another webserver to build
+on like Apache and does not need to be run via any kind of CGI. yChat creates
+its own socket on a customized port (standard port: 2000) and seems to be a full
+featured HTTP web server to the clients (web browsers).
+
+The yChat code base can be converted to an yhttpd code base automaticaly. yhttpd
+is the webserver subset of yChat which runs completely stand alone and provides
+normal websites to the net. It also supports Common Gateway Interface (CGI)
+scripting.
+
+- Its fast and secure -
+yChat is written in C++ which is faster than any Java based Chat-Server or any
+server written in a scripting language like PHP, Python or Perl. As the
+internal data structures hash maps are used to garuantee searching certain
+values in O(1) amount of time. If a hash maps gets full, it will be rehashed.
+Currently, yChat has been measured providing over 1000 hits/requests per second
+on a FreeBSD based server box while using less than 2% of CPU usage
+on a Athlon XP 1900+. Performance seems to be limited by your bandwith only.
+Also, each user gets its own session id (random string) with a standard length
+of 50 chars to authenticate each logged in user. The length of the session id
+can be redefined as well. Also, the session id will get md5-hashed optionally
+so thats even harder to reverse engineering the session ids of other users.
+
+- Its HTML template based and easy to customize via XML based configuration -
+All HTML sites are predefined as HTML-Template files and can be easily modified