summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES21
-rwxr-xr-x[-rw-r--r--]COPYING0
-rwxr-xr-xMakefile77
-rw-r--r--NEWS26
-rwxr-xr-xREADME479
-rw-r--r--TODO97
-rwxr-xr-xconfigure1618
-rw-r--r--etc/ychat.conf125
-rwxr-xr-x[-rw-r--r--]html/favicon.icobin2238 -> 2238 bytes
-rwxr-xr-xhtml/frameset.html12
-rwxr-xr-xhtml/help.html2
-rwxr-xr-xhtml/index.html46
-rwxr-xr-xhtml/input.html41
-rwxr-xr-xhtml/notfound.html4
-rwxr-xr-xhtml/online.html23
-rwxr-xr-xhtml/stream.html35
-rwxr-xr-x[-rw-r--r--]html/style.css49
-rw-r--r--scripts/README2
-rwxr-xr-xscripts/buildnr.pl4
-rwxr-xr-xscripts/config.sh6
-rw-r--r--scripts/makeyhttpd.pl97
-rwxr-xr-xscripts/screen.sh2
-rwxr-xr-xscripts/setglobvals.pl2
-rwxr-xr-xscripts/stats.pl2
-rwxr-xr-xsrc/Makefile.in8
-rwxr-xr-xsrc/chat/base.h158
-rwxr-xr-xsrc/chat/base.tmpl49
-rwxr-xr-xsrc/chat/chat.cpp499
-rwxr-xr-xsrc/chat/chat.h72
-rwxr-xr-xsrc/chat/gcol.cpp161
-rwxr-xr-xsrc/chat/gcol.h31
-rwxr-xr-xsrc/chat/perm.cpp69
-rwxr-xr-xsrc/chat/perm.h45
-rwxr-xr-xsrc/chat/room.cpp108
-rwxr-xr-xsrc/chat/room.h117
-rwxr-xr-xsrc/chat/sess.cpp39
-rwxr-xr-xsrc/chat/sess.h21
-rwxr-xr-xsrc/chat/sman.cpp127
-rwxr-xr-xsrc/chat/sman.h30
-rwxr-xr-xsrc/chat/user.cpp767
-rwxr-xr-xsrc/chat/user.h252
-rwxr-xr-xsrc/cli/cli.cpp8
-rwxr-xr-xsrc/conf/conf.cpp14
-rwxr-xr-xsrc/conf/conf.h3
-rwxr-xr-xsrc/configure19
-rw-r--r--src/contrib/README4
-rw-r--r--src/contrib/crypt/md5.cpp333
-rw-r--r--src/contrib/crypt/md5.h15
-rw-r--r--src/contrib/crypt/md5crypt.cpp233
-rw-r--r--src/contrib/xml/README2
-rwxr-xr-xsrc/data/con.cpp48
-rwxr-xr-xsrc/data/con.h8
-rwxr-xr-xsrc/data/con_base.cpp5
-rwxr-xr-xsrc/data/con_base.h4
-rw-r--r--src/data/data.cpp262
-rw-r--r--src/data/data.h18
-rw-r--r--src/data/data_base.cpp232
-rw-r--r--src/data/data_base.h23
-rwxr-xr-xsrc/glob.h44
-rwxr-xr-xsrc/html.cpp16
-rwxr-xr-xsrc/html.h2
-rwxr-xr-xsrc/main.cpp33
-rwxr-xr-xsrc/modl.cpp11
-rwxr-xr-xsrc/modl.h2
-rwxr-xr-xsrc/mods/Makefile9
-rw-r--r--src/mods/commands/Makefile6
-rwxr-xr-xsrc/mods/commands/Makefile.in2
-rwxr-xr-xsrc/mods/commands/yc_away.cpp126
-rwxr-xr-xsrc/mods/commands/yc_col.cpp127
-rwxr-xr-xsrc/mods/commands/yc_compopt.cpp21
-rwxr-xr-xsrc/mods/commands/yc_exec.cpp84
-rwxr-xr-xsrc/mods/commands/yc_fake.cpp43
-rwxr-xr-xsrc/mods/commands/yc_getroom.cpp70
-rwxr-xr-xsrc/mods/commands/yc_getrusage.cpp69
-rw-r--r--src/mods/commands/yc_getstatus.cpp2
-rwxr-xr-xsrc/mods/commands/yc_help.cpp81
-rwxr-xr-xsrc/mods/commands/yc_invisible.cpp45
-rwxr-xr-xsrc/mods/commands/yc_j.cpp183
-rwxr-xr-xsrc/mods/commands/yc_ko.cpp88
-rwxr-xr-xsrc/mods/commands/yc_m.cpp65
-rwxr-xr-xsrc/mods/commands/yc_md5.cpp84
-rwxr-xr-xsrc/mods/commands/yc_me.cpp67
-rwxr-xr-xsrc/mods/commands/yc_morph.cpp77
-rwxr-xr-xsrc/mods/commands/yc_msg.cpp96
-rwxr-xr-xsrc/mods/commands/yc_q.cpp27
-rwxr-xr-xsrc/mods/commands/yc_reload.cpp29
-rwxr-xr-xsrc/mods/commands/yc_ren.cpp110
-rwxr-xr-xsrc/mods/commands/yc_s.cpp81
-rwxr-xr-xsrc/mods/commands/yc_set.cpp175
-rwxr-xr-xsrc/mods/commands/yc_template.cpp25
-rwxr-xr-xsrc/mods/commands/yc_time.cpp27
-rwxr-xr-xsrc/mods/commands/yc_topic.cpp138
-rwxr-xr-xsrc/mods/commands/yc_uptime.cpp27
-rwxr-xr-xsrc/mods/commands/yc_version.cpp21
-rw-r--r--src/mods/html/Makefile3
-rwxr-xr-xsrc/mods/html/Makefile.in4
-rw-r--r--src/mods/html/yc_admin.cpp119
-rwxr-xr-xsrc/mods/html/yc_colors.cpp52
-rwxr-xr-xsrc/mods/html/yc_help.cpp76
-rwxr-xr-xsrc/mods/html/yc_options.cpp81
-rwxr-xr-xsrc/mods/html/yc_register.cpp165
-rwxr-xr-x[-rw-r--r--]src/msgs.h11
-rwxr-xr-xsrc/ncur/ncur.cpp21
-rwxr-xr-xsrc/reqp.cpp103
-rwxr-xr-xsrc/reqp.h1
-rwxr-xr-xsrc/sock/sock.cpp52
-rwxr-xr-xsrc/sock/sock.h2
-rw-r--r--src/stats.cpp46
-rw-r--r--src/stats.h12
-rwxr-xr-xsrc/time/timr.cpp19
-rw-r--r--src/tool/tool.h2
-rwxr-xr-xsrc/wrap.cpp8
-rwxr-xr-xsrc/wrap.h23
113 files changed, 4065 insertions, 5402 deletions
diff --git a/CHANGES b/CHANGES
index c01e3d2..976217a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,23 @@
+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 yhttpd.conf.
+- 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
@@ -29,9 +44,9 @@ Changes from 0.6 to 0.7.0 RELEASE
- 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 yhttpd more modular so yhttpd can be extracted from it (scripts/makeyhttpd.pl)
+- 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 (yhttpd.conf)
+- 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/Makefile b/Makefile
index cf91b55..716f83a 100755
--- a/Makefile
+++ b/Makefile
@@ -1,46 +1,48 @@
MAKE=`tail -1 make.version`
PREFIX=`grep "define PREFIX" src/glob.h | cut -d'"' -f2`
all: base modules version
- @echo "Now edit the yhttpd.conf and run yhttpd!"
+ @echo "Now edit the ychat.conf and run ychat!"
@echo "The config file is searched in the following order:"
- @echo " ./yhttpd.conf "
- @echo " ~/.yhttpd/yhttpd.conf "
- @echo " ./etc/yhttpd.conf "
- @echo " /etc/yhttpd.conf "
- @echo " $(PREFIX)/etc/yhttpd.conf "
+ @echo " ./ychat.conf "
+ @echo " ~/.ychat/ychat.conf "
+ @echo " ./etc/ychat.conf "
+ @echo " /etc/ychat.conf "
+ @echo " $(PREFIX)/etc/ychat.conf "
install: deinstall
- @echo "Instaling yhttpd to $(PREFIX)"
- @cp bin/yhttpd $(PREFIX)/bin
- @if ! test -d $(PREFIX)/lib/yhttpd; then mkdir -p $(PREFIX)/lib/yhttpd; fi
- @if ! test -d $(PREFIX)/share/yhttpd/log/rooms; then mkdir -p $(PREFIX)/share/yhttpd/log/rooms; fi
+ @echo "Instaling ychat to $(PREFIX)"
+ @cp bin/ychat $(PREFIX)/bin
+ @if ! test -d $(PREFIX)/lib/ychat; then mkdir -p $(PREFIX)/lib/ychat; fi
+ @if ! test -d $(PREFIX)/share/ychat/log/rooms; then mkdir -p $(PREFIX)/share/ychat/log/rooms; fi
@if ! test -d $(PREFIX)/etc; then mkdir $(PREFIX)/etc; fi
- @if test -d mods; then cp -Rp mods $(PREFIX)/lib/yhttpd/mods; fi
- @cp -Rp lang $(PREFIX)/share/yhttpd/lang
- @if test -f $(PREFIX)/etc/yhttpd.conf; then mv $(PREFIX)/etc/yhttpd.conf $(PREFIX)/etc/yhttpd.conf.bak; fi
- @cp etc/yhttpd.conf etc/yhttpd.conf.tmp
- @sed "s#mods/#$(PREFIX)/lib/yhttpd/mods/#" etc/yhttpd.conf.tmp > etc/yhttpd.conf.tmp.2 && mv etc/yhttpd.conf.tmp.2 etc/yhttpd.conf.tmp
- @sed "s#\"log/#\"$(PREFIX)/share/yhttpd/log/#" etc/yhttpd.conf.tmp > etc/yhttpd.conf.tmp.2 && mv etc/yhttpd.conf.tmp.2 etc/yhttpd.conf.tmp
- @sed "s#LANGUAGE_DIR=\"lang/#LANGUAGE_DIR=\"$(PREFIX)/share/yhttpd/lang/#" etc/yhttpd.conf.tmp > etc/yhttpd.conf.tmp.2 && mv etc/yhttpd.conf.tmp.2 etc/yhttpd.conf.tmp
- @mv etc/yhttpd.conf.tmp $(PREFIX)/etc/yhttpd.conf
- @echo "yhttpd configuration file can be found under"
- @echo " $(PREFIX)/etc/yhttpd.conf"
- @echo "Copy it to ~/.yhttpd/yhttpd.conf to use local settings :-)"
- @echo "Be sure that $(PREFIX)/share/yhttpd/logs is writable by your user or modify "
- @echo "logging dirs in the yhttpd.conf to a local directory."
- @echo "The most secure would be an additional user 'yhttpd'!"
+ @if test -d mods; then cp -Rp mods $(PREFIX)/lib/ychat/mods; fi
+ @cp -Rp html $(PREFIX)/share/ychat/html
+ @cp -Rp lang $(PREFIX)/share/ychat/lang
+ @if test -f $(PREFIX)/etc/ychat.conf; then mv $(PREFIX)/etc/ychat.conf $(PREFIX)/etc/ychat.conf.bak; fi
+ @cp etc/ychat.conf etc/ychat.conf.tmp
+ @sed "s#mods/#$(PREFIX)/lib/ychat/mods/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @sed "s#\"log/#\"$(PREFIX)/share/ychat/log/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @sed "s#LANGUAGE_DIR=\"lang/#LANGUAGE_DIR=\"$(PREFIX)/share/ychat/lang/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @sed "s#HTML_TEMPLATE_DIR=\"html/#HTML_TEMPLATE_DIR=\"$(PREFIX)/share/ychat/html/#" etc/ychat.conf.tmp > etc/ychat.conf.tmp.2 && mv etc/ychat.conf.tmp.2 etc/ychat.conf.tmp
+ @mv etc/ychat.conf.tmp $(PREFIX)/etc/ychat.conf
+ @echo "yChat configuration file can be found under"
+ @echo " $(PREFIX)/etc/ychat.conf"
+ @echo "Copy it to ~/.ychat/ychat.conf to use local settings :-)"
+ @echo "Be sure that $(PREFIX)/share/ychat/logs is writable by your user or modify "
+ @echo "logging dirs in the ychat.conf to a local directory."
+ @echo "The most secure would be an additional user 'ychat'!"
uninstall: deinstall
deinstall:
- @echo "Deinstalling yhttpd from $(PREFIX)"
- @if test -f $(PREFIX)/bin/yhttpd; then rm -f $(PREFIX)/bin/yhttpd; fi
- @if test -d $(PREFIX)/lib/yhttpd; then rm -Rf $(PREFIX)/lib/yhttpd; fi
- @if test -d $(PREFIX)/share/yhttpd; then rm -Rf $(PREFIX)/share/yhttpd; fi
- @echo "Done. Please remove manually $(PREFIX)/etc/yhttpd.conf to complete"
+ @echo "Deinstalling ychat from $(PREFIX)"
+ @if test -f $(PREFIX)/bin/ychat; then rm -f $(PREFIX)/bin/ychat; fi
+ @if test -d $(PREFIX)/lib/ychat; then rm -Rf $(PREFIX)/lib/ychat; fi
+ @if test -d $(PREFIX)/share/ychat; then rm -Rf $(PREFIX)/share/ychat; fi
+ @echo "Done. Please remove manually $(PREFIX)/etc/ychat.conf to complete"
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/yhttpd; then echo "Backing up old binary";if test -f bin/yhttpd.old; then rm -f bin/yhttpd.old; fi; mv bin/yhttpd bin/yhttpd.old; fi
+ @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
@@ -49,18 +51,23 @@ clean_base:
stats:
@perl scripts/stats.pl
run:
- ./bin/yhttpd
+ ./bin/ychat
base_start: base
- ./bin/yhttpd
+ ./bin/ychat
start: base modules
- ./bin/yhttpd
+ ./bin/ychat
gpl:
@more COPYING
+#//<<*
+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@yhttpd.org!"
+ @echo "For more questions read the README file or contact mail@ychat.org!"
setup:
@./configure
@${MAKE}
@@ -80,4 +87,4 @@ mrproper: clean
version:
@echo "`grep VERSION src/msgs.h | cut -d'"' -f2`-`grep BRANCH src/msgs.h| cut -d'"' -f2` Build `grep BUILD src/msgs.h| cut -d' ' -f3`"
debug:
- @gdb bin/yhttpd yhttpd.core
+ @gdb bin/ychat ychat.core
diff --git a/NEWS b/NEWS
index be3ba32..ea7b914 100644
--- a/NEWS
+++ b/NEWS
@@ -1,29 +1,3 @@
-::(21.06.05)::yChat 0.8.1-RELEASE is available. Some changes which were made: The /gag and /ungag commands were added. Flood protection has been implemented. The Copyright has been changed to EXA Digital Solutions (yChat will stay open source as usual, no panic!). Also some minor bugs have been fixed.
-::(14.06.05)::The Copyright holder of yChat has been changed from Paul C. Buetow (thats me) into <a href="http://www.exa-ds.com">EXA Digital Solutions</a> webhosting, which a webhosting firm in which I am involved. With EXA DS I could make more yChat publicity.
-::(25.05.05)::yChat 0.8-RELEASE is available. This is the first release of the 0.8-CURRENT branch. OpenSSL support has been integrated. Thanks to CryptoMail.org for the patches! Also, the HTTP parsing methods have been reviewed and improved by the CryptoMail crew as well. In addition, several smaller bugs were fixed.
-::(08.05.05)::yChat 0.7.9.3-RELEASE is available. This is the first STABLE release of the 0.7 branch. yChat 0.7.9.2 still has been of CURRENT. The new release only includes some bugfixes related to the Makefiles, configure-scripts. Also a security patch for the 0.8-CURRENT branch has been backported into 0.7.9.3.
-::(04.05.05)::OpenSSL support has been integrated into yChat 0.8-CURRENT. The 0.8-RELEASE will come soon after some additional documentation stuff related to OpenSSL has been done. Thanks to <a href="http://CryptoMail.org">CryptoMail.org</a> for mailing the OpenSSL patch.
-::(13.04.05)::The 0.7 yChat branch now became stable. At this point, its yChat 0.7.9.3-STABLE, which will become some day the first STABLERELEASE of the 0.7 branch.
-::(12.04.05)::Released yChat 0.5.5 of the STABLE branch. This release includes a security fix in the session manager. We also put the yChat 0.8 branch into CVS. The 0.7 branch will become stable soon.
-::(10.04.05)::Released yChat 0.7.9.2. This release adds the dump command for the command line interface which prints out the internal yChat data structure. This feature makes it easier to track bugs. Also, a big bug of the session manager has been wiped out.
-::(08.04.05)::C++ yChat is now about 2 years old. Happy birthday yChat! The next few releases of the CURRENT branch will mostly contain bugfixes and stability improvements. We want to get ready to change 0.7-CURRENT into 0.7-STABLE in order to work on newer 0.8-CURRENT versions.
-::(07.04.05)::Released yChat 0.7.9.1. This release includes some minor bugfixes. The ychat.conf file is now valid XML. Also some typos have been fixed. Also a scripts/makedist.sh script has been added which creates a .tar.bz2 ball of the current source tree.
-::(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.
-::(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.
-::(12.02.05)::Released yChat 0.7.4. This release includes a code cleanup and a dynamic increasing thread pool. Also, some other thread pool and session engine improvements were made. The Makefiles got more organized and the HTTPD header has got a Content-length line. The Content-type text/plain is now also supported. The command line interface has got the ! (bang) operator. So you can run programs of your shell through yChat. The HTML interface has got a scrolling checkbox to de/activate the scrolling of the chat stream. Last but not least some bugfixes were made.
-::(09.02.05)::Tagged yChat 0.7.4-PRERELEASE into CVS. The RELEASE will follow this week.
-::(08.01.05)::We passed the build number 3000! 3000 times yChat has been compiled during the developing process since there are build numbers! Also the first steps have been made porting yChat/yhttpd to the Windows platform using Cygwin (yChat 0.7.4-CURRENT Build 3040 CYGWIN_NT-5.1 1.5.12 (0.116/4/2) i686). It runs without having installed Cygwin and having an 1MB cygwin1.dll file instead. There are still some issues (like dynamic modules [which means, that there are no chat commands and no color choser etc], command line interface, ncurses interface, database support) which do not yet run on Cygwin. But those issues will be resolved the next weeks. An alpha (experimental) binary yChat/Win32 release might be done also.
-::(04.01.05)::First we wish all of you a happy new year. Second we have to announce that yhttpd 0.7-CURRENT now also has tested on an OpenBSD/i386 MP 3.6 box with success. Also yChat 0.7.4-CURRENT is now available from CVS.
-::(29.12.04)::Released yChat 0.7.3-RELEASE. New features: Added the /all command (Global system message), added FreeBSD 5.3-RELEASE support, added chat.enableguest option. Renamed the /getstatus command into /about. Fixed some bugs.
-::(09.11.04)::Released yChat 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