summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES41
-rwxr-xr-xCOPYING1
-rwxr-xr-xMakefile111
-rw-r--r--NEWS8
-rwxr-xr-xREADME283
-rw-r--r--TODO60
-rwxr-xr-xconfigure27
-rw-r--r--etc/ychat.conf28
-rwxr-xr-xhtml/help.html2
-rwxr-xr-xhtml/index.html37
-rwxr-xr-xhtml/input.html10
-rwxr-xr-xhtml/online.html3
-rwxr-xr-xhtml/stream.html25
-rwxr-xr-xhtml/style.css49
-rw-r--r--scripts/README2
-rwxr-xr-xscripts/astyle.sh2
-rwxr-xr-xscripts/buildnr.pl4
-rwxr-xr-xscripts/config.sh6
-rw-r--r--scripts/makeyhttpd.pl10
-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.h154
-rwxr-xr-xsrc/chat/base.tmpl18
-rwxr-xr-xsrc/chat/chat.cpp467
-rwxr-xr-xsrc/chat/chat.h72
-rwxr-xr-xsrc/chat/gcol.cpp159
-rwxr-xr-xsrc/chat/gcol.h31
-rwxr-xr-xsrc/chat/perm.cpp69
-rwxr-xr-xsrc/chat/perm.h45
-rwxr-xr-xsrc/chat/room.cpp96
-rwxr-xr-xsrc/chat/room.h108
-rwxr-xr-xsrc/chat/sess.cpp39
-rwxr-xr-xsrc/chat/sess.h21
-rwxr-xr-xsrc/chat/sman.cpp117
-rwxr-xr-xsrc/chat/sman.h29
-rwxr-xr-xsrc/chat/user.cpp673
-rwxr-xr-xsrc/chat/user.h235
-rwxr-xr-xsrc/cli/cli.cpp16
-rwxr-xr-xsrc/conf/conf.cpp14
-rwxr-xr-xsrc/conf/conf.h3
-rwxr-xr-xsrc/configure25
-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/logd.cpp4
-rwxr-xr-xsrc/main.cpp33
-rw-r--r--src/maps/hmap.h6
-rw-r--r--src/maps/hmap.tmpl11
-rw-r--r--src/maps/smap.h1
-rw-r--r--src/maps/smap.tmpl8
-rwxr-xr-xsrc/modl.cpp11
-rwxr-xr-xsrc/modl.h2
-rwxr-xr-xsrc/mods/Makefile9
-rw-r--r--src/mods/commands/yc_about.cpp74
-rwxr-xr-xsrc/mods/commands/yc_all.cpp77
-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
-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.cpp94
-rwxr-xr-xsrc/mods/commands/yc_q.cpp27
-rwxr-xr-xsrc/mods/commands/yc_reload.cpp29
-rwxr-xr-xsrc/mods/commands/yc_ren.cpp108
-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/yc_admin.cpp119
-rwxr-xr-xsrc/mods/html/yc_colors.cpp52
-rwxr-xr-xsrc/mods/html/yc_help.cpp74
-rwxr-xr-xsrc/mods/html/yc_options.cpp81
-rwxr-xr-xsrc/mods/html/yc_register.cpp165
-rw-r--r--src/msgs.h14
-rwxr-xr-xsrc/ncur/ncur.cpp21
-rwxr-xr-xsrc/reqp.cpp107
-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.cpp16
-rw-r--r--src/tool/tool.h12
-rwxr-xr-xsrc/wrap.cpp8
-rwxr-xr-xsrc/wrap.h23
114 files changed, 3977 insertions, 3428 deletions
diff --git a/CHANGES b/CHANGES
index 21919f7..c4e2d04 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,39 @@
-Changes from 0.6 to 0.7 RELEASE
+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
@@ -18,9 +53,9 @@ Changes from 0.6 to 0.7 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 27058a5..a43ea21 100755
--- a/COPYING
+++ b/COPYING
@@ -106,6 +106,7 @@ above, provided that you also meet all of these conditions:
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
diff --git a/Makefile b/Makefile
index ff97421..96266ea 100755
--- a/Makefile
+++ b/Makefile
@@ -1,76 +1,99 @@
+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!"
+all: base modules version mail
+ @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 "
+mail:
+ @echo "VERSION:" > mail.tmp
+ @gmake 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
- @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 gmake -C ./src/mods; fi
+ @if test -d ./src/mods; then ${MAKE} -C ./src/mods; fi
clean_modules:
- @if test -d ./src/mods; then gmake -C ./src/mods clean; fi
+ @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
- @gmake -C ./src
+ @${MAKE} -C ./src
clean_base:
- @gmake -C ./src clean
+ @${MAKE} -C ./src clean
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 gmake with the following parameters:"
- @grep "^ gmake " README
- @echo "For more questions read the README file or contact mail@yhttpd.org!"
+ @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
- @gmake
+ @${MAKE}
config:
@sh -c "scripts/config.sh"
- @echo If you run gmake config from the command line then you may need
+ @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
@@ -78,4 +101,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 f255184..034d63d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,3 @@
-::(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.
-::(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 /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.
-