diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:48 +0200 |
| commit | d9c4a95345bd758e45196b29368bd2ff0f2790e3 (patch) | |
| tree | 8e7aa76f3f2a3a064f440f7410e4ec01cd34a78f | |
| parent | d4c9f10efe815af146438cafb694d16da0e5650a (diff) | |
tagging ychat-0.5.2ychat-0.5.2
| -rw-r--r-- | Makefile | 101 | ||||
| -rwxr-xr-x[-rw-r--r--] | README | 474 | ||||
| -rwxr-xr-x | base.cpp | 54 | ||||
| -rw-r--r--[-rwxr-xr-x] | base.h | 88 | ||||
| -rw-r--r--[-rwxr-xr-x] | chat.cpp | 181 | ||||
| -rw-r--r--[-rwxr-xr-x] | chat.h | 34 | ||||
| -rw-r--r--[-rwxr-xr-x] | cmnd.cpp | 6 | ||||
| -rw-r--r--[-rwxr-xr-x] | cmnd.h | 8 | ||||
| -rw-r--r-- | cmnd/yc_getrusage.cpp | 63 | ||||
| -rw-r--r-- | cmnd/yc_q.cpp | 17 | ||||
| -rw-r--r-- | cmnd/yc_test.cpp | 13 | ||||
| -rw-r--r-- | cmnd/yc_version.cpp | 19 | ||||
| -rw-r--r--[-rwxr-xr-x] | conf.cpp | 71 | ||||
| -rw-r--r--[-rwxr-xr-x] | conf.h | 8 | ||||
| -rwxr-xr-x | conf.txt | 8 | ||||
| -rw-r--r-- | config.cache | 30 | ||||
| -rw-r--r-- | config.log | 71 | ||||
| -rwxr-xr-x | config.status | 151 | ||||
| -rwxr-xr-x | configure | 1596 | ||||
| -rw-r--r--[-rwxr-xr-x] | cont.cpp | 8 | ||||
| -rw-r--r--[-rwxr-xr-x] | cont.h | 19 | ||||
| -rw-r--r--[-rwxr-xr-x] | glob.h | 28 | ||||
| -rw-r--r-- | hmap.cpp | 159 | ||||
| -rw-r--r-- | hmap.h | 175 | ||||
| -rw-r--r--[-rwxr-xr-x] | html.cpp | 175 | ||||
| -rw-r--r--[-rwxr-xr-x] | html.h | 40 | ||||
| -rw-r--r--[-rwxr-xr-x] | html/favicon.ico | bin | 2238 -> 2238 bytes | |||
| -rwxr-xr-x | html/frameset.html | 12 | ||||
| -rwxr-xr-x | html/index.html | 39 | ||||
| -rwxr-xr-x | html/input.html | 50 | ||||
| -rwxr-xr-x | html/notfound.html | 4 | ||||
| -rwxr-xr-x | html/online.html | 21 | ||||
| -rwxr-xr-x | html/stream.html | 33 | ||||
| -rw-r--r--[-rwxr-xr-x] | html/style.css | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | incl.h | 4 | ||||
| -rw-r--r--[-rwxr-xr-x] | lang.cpp | 75 | ||||
| -rw-r--r--[-rwxr-xr-x] | lang.h | 8 | ||||
| -rw-r--r-- | logd.cpp | 65 | ||||
| -rw-r--r-- | logd.h | 25 | ||||
| -rw-r--r--[-rwxr-xr-x] | main.cpp | 71 | ||||
| -rw-r--r--[-rwxr-xr-x] | modl.cpp | 104 | ||||
| -rw-r--r--[-rwxr-xr-x] | modl.h | 16 | ||||
| -rw-r--r--[-rwxr-xr-x] | msgs.h | 9 | ||||
| -rw-r--r--[-rwxr-xr-x] | mutx.cpp | 6 | ||||
| -rw-r--r--[-rwxr-xr-x] | mutx.h | 12 | ||||
| -rw-r--r--[-rwxr-xr-x] | name.cpp | 9 | ||||
| -rw-r--r--[-rwxr-xr-x] | name.h | 22 | ||||
| -rw-r--r--[-rwxr-xr-x] | pool.cpp | 294 | ||||
| -rw-r--r--[-rwxr-xr-x] | pool.h | 89 | ||||
| -rw-r--r--[-rwxr-xr-x] | reqp.cpp | 395 | ||||
| -rw-r--r--[-rwxr-xr-x] | reqp.h | 52 | ||||
| -rw-r--r--[-rwxr-xr-x] | room.cpp | 6 | ||||
| -rw-r--r--[-rwxr-xr-x] | room.h | 28 | ||||
| -rw-r--r-- | s_chat.h | 21 | ||||
| -rw-r--r-- | s_conf.h | 21 | ||||
| -rw-r--r-- | s_html.h | 21 | ||||
| -rw-r--r-- | s_lang.h | 22 | ||||
| -rw-r--r-- | s_modl.h | 21 | ||||
| -rw-r--r-- | s_mutx.h | 21 | ||||
| -rw-r--r-- | s_sman.h | 21 | ||||
| -rw-r--r-- | s_sock.h | 21 | ||||
| -rw-r--r-- | s_tool.cpp | 159 | ||||
| -rw-r--r-- | s_tool.h | 15 | ||||
| -rwxr-xr-x | scripts/astyle.sh | 5 | ||||
| -rw-r--r-- | sess.cpp | 30 | ||||
| -rw-r--r-- | sess.h | 20 | ||||
| -rw-r--r-- | sman.cpp | 43 | ||||
| -rw-r--r-- | sman.h | 30 | ||||
| -rw-r--r--[-rwxr-xr-x] | sock.cpp | 305 | ||||
| -rw-r--r--[-rwxr-xr-x] | sock.h | 46 | ||||
| -rw-r--r--[-rwxr-xr-x] | thrd.cpp | 5 | ||||
| -rw-r--r--[-rwxr-xr-x] | thrd.h | 19 | ||||
| -rw-r--r--[-rwxr-xr-x] | user.cpp | 175 | ||||
| -rw-r--r--[-rwxr-xr-x] | user.h | 151 |
74 files changed, 3857 insertions, 2361 deletions
@@ -1,88 +1,13 @@ -PREFIX=`grep "define PREFIX" src/glob.h | cut -d'"' -f2` -all: 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 " -install: deinstall - @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/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 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 -clean_modules: - @if test -d ./src/mods; then gmake -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 - @gmake -C ./src -clean_base: - @gmake -C ./src clean -stats: - @perl scripts/stats.pl -run: - ./bin/ychat -base_start: base - ./bin/ychat -start: base modules - ./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@ychat.org!" -setup: - @./configure - @gmake -config: - @sh -c "scripts/config.sh" - @echo If you run gmake 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 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: - @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/ychat ychat.core +# Generated automatically from Makefile.in by configure. +SRCS=chat.cpp s_chat.cpp cmnd.cpp conf.cpp s_conf.cpp cont.cpp html.cpp s_html.cpp lang.cpp s_lang.cpp logd.cpp main.cpp modl.cpp s_modl.cpp mutx.cpp s_mutx.cpp name.cpp pool.cpp reqp.cpp room.cpp sock.cpp s_sock.cpp thrd.cpp s_tool.cpp user.cpp sess.cpp sman.cpp s_sman.cpp +OBJS=$(SRCS:.cpp=.o) +CC=g++ +LDFLAGS= -lstdc++ -g +LDADD=-pthread -D_THREAD_SAFE +all: ychat +$(SRCS): + $(CC) $(CFLAGS) -c $*.cpp +ychat: $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD) +clean: + rm *.o @@ -1,7 +1,6 @@ -yChat; Homepage: www.yChat.org; Version 0.7-RELEASE - +yChat++ Basic; Homepage: www.yChat.org; Version 0.5.2-LEGACYRELEASE Copyright (C) 2003 Paul C. Buetow, Volker Richter -Copyright (C) 2004 Paul C. Buetow +Copyright (C) 2005 Paul C. Buetow ----------------------------------------------------------------- This program is free software; you can redistribute it and/or @@ -17,180 +16,38 @@ 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. ------------------------------------------------------------------ -YCHAT TABLE OF CONTENTS: +----------------------------------------------------------------- -0.0.0 YCHAT FEATURES //<< +0.0.0 LEGACY YCHAT 0.5 TABLE OF CONTENTS 1.0.0 REQUIREMENTS 1.1.0 TESTED PLATFORMS -1.2.0 IMPORTANT NOTICES -1.3.0 HOW TO OBTAIN YCHAT +1.2.0 IMPORTANT NOTES +1.3.0 HOW TO OBTAIN YCHAT++ 1.3.1 INSTALLATION -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 -features HTTP web server to the clients (web browsers). All it needs is an -external database server (currently MySQL only). - -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. -The maximum usage in % can be redefined too (standard is 90%). Currently, yChat -has been measured providing over 5000 hits/requests per second (chat message -postings) on a FreeBSD based server box. 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. Soon, OpenSSL sockets will -be included too to enable HTTPS chatting. - -- 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 -to use with an customized web design. Also, a lot of yChat preferences can be -set in the main configuration file (ychat.conf). ychat.conf is completely written -in XML 1.0 which makes it easier to use the configuration options in programs of -3rd persons which may want to write some usefull tools for yChat. -yChat caches all HTML and web images to improve overall performance. If needed, the -cache can be cleared to recache new versions of the template files. - -- Its language template based - -The administrator can easily create a new language in which all system messages -appear to the Chat-User. The predefined languages is english but others can be -added easily. The language can be edited in the XML based configuration file. - -- MySQL based database - -Registered users are stored in a MySQL database. C++ Programmers may feel free -to replace the database wrapper class (data.h) with another database routines -to use other databases such as PostgreSQL, SQLite or a text based database etc. -If wished, you can disable database support in the pre-compile options. - -- It has an administration interface - -yChat includes an ncurses based administration interface which tracks some -interesting statistics and system messages and enables you to do certain -administrative tasks. In addition, you can switch to the CLI (command line -interface) mode of the administration interface in order to be provided with -more available functions (like keeping track of the current system usage etc.). -If you dont like ncurses and/or the CLI you can disable both options in the pre- -compile options. - -- It has logging capabilities - -The logging manager keeps track to all yChat system messages (such as users -wich log in and out, modules which are loaded, MySQL queries etc.). Also, an -Apache-Style combined log file format is created by yChat (you can parse this -logfile with any Apache logfile parser like awstats etc.). And last but not -least, all public messages of all available rooms will be logged to disk as -well . To improve performance, you can define the logging puffer (standardly -new logs will be written to disk after each 20 lines). If you want to log -everything immediately, you can reset this option to 1 in ychat.conf. - -- Its modular - -All chat commands are realized through dynamic loadable module files which can -be recompiled and reloaded without restarting the whole yChat server. Also -HTML-Sites with certain tasks can be compiled as a module like -mods/html/yc_register.so, mods/html/yc_options.so and mods/html/yc_colors.so -etc. so you can also program your dynamic yChat websites in C++. - -- Its multi threaded (POSIX threads) - -There is only one main process which spawns several threads, each for its own -unique task. For example one thread is used to handle the socket manager which -waits for incoming TCP/IP requests, another thread schedules the system timer -which proves if clients are still active or frees not needed memory in certain -time intervals (see also "Garbage collector"). Also, each Chat-User gets it own -thread. There is no need of memory wastage by creating for each task a new -process. All User-Threads are managed by a thread pool to avoid CPU wastage -creating every time a new thread by reusing thread objects which have done its -jobs already and have been added to the pool again.. - -- Its using a smart garbage collection engine - -All users and rooms which dont have to be kept in the main memory (because the -user has logged out or the room has been destroyed because it was empty) will -not be deleted immediately but be placed for about 10 minutes in the yChat -garbage collector. Each time a new room is created the systems checks the -garbage to reuse an inactive room object. If a certain user wants to log in, the -system checks if he is already present in the garbage collector. If yes, he will -be reactivated without wasting expensive database queries to fetch the user's -options. This improves overall performance on heavily loaded yChat servers if a -lot of user and room objects are created and destroyed frequently. -//*>> 1.0.0 REQUIREMENTS: -- GNU GCC G++ 3.4 or 3.3 or 3.2 or 3.1 - The GNU C++ compiler. G++ version 3.0 or 2.x does NOT work. - -- GNU make 3.80 (gmake) or higher - If you dont have a gmake executable but make is gnu make then you need - to add a symlink or alias from gmake to make. - yChat Makefiles only have been tested with GNU make and may not work with - other make versions. - -- mysql-client 4.x (3.x may do too but is not supported) - Includes libmysqlclient and the mysql.h header files. - -- ncurses 5.x - Includes libncurses and the ncurses.h header files. - -- Screen - Only needed if yChat should run in background with - ncurses enabled. - -- Perl 5.x - Is needed for some scripts. Is not needed if you use precompiled binaries. +- gcc 3.x + The GNU C++ compiler. 1.1.0 TESTED PLATFORMS: -The following platforms have been tested with success. If you find out that -a listed platform did not work at all please contact me: +The following platforms have been tested with success: - Operating system (arch) GNU G++ GNU make -- FreeBSD 5.2.1-RELEASE (i386) 3.3.3 3.80 -- FreeBSD 4.9-RELEASE (i386) 3.3.4 3.80 -- FreeBSD 4.10-RELEASE (i386) 3.4.1 3.80 -- Gentoo Linux 2004.2 (i386) 3.3.2 3.80 -- OpenBSD 3.6 MP (i386) 3.3.2 3.80 -- Slackware Linux 10.0 (i386) 3.4.0 3.80 -- SUSE Linux 8.0, G (i386) 3.3.1 3.80 +- Linux with GCC 3.2.0, GNU make 3.79.1 +- FreeBSD 5.1-RELEASE-p2, GCC 3.2.2, GNU make 3.80 +- FreeBSD 5.3-RELEASE, GCC 3.4, GNU make 3.80 -Other platforms like Linux based systems, other BSD-Systems or UNICES -are very likely to work too. - -1.2.0 IMPORTANT NOTICES: +1.2.0 IMPORTANT NOTES: Before you compile the source you have to be sure to use at least GCC -version 3.1 with pthreads enabled. ( Type gcc -v to check it ). -GCC 2.95 and 3.0 did not work while testing and WON'T BE SUPPORTED! +version 3.x with pthreads enabled. ( Type gcc -v to check it ). +GCC 2.95 did not work while testing on linux and WON'T BE SUPPORTED! If you like to support yChat++, please write us an email and tell what you can/like/would help ;-]. Please also take a look at the yChat++ homepage which is located at http://www.yChat.org. @@ -200,174 +57,149 @@ homepage which is located at http://www.yChat.org. yChat can be downloaded as a source package or through CVS. The packages are located at http://www.yChat.org -> Sourcecode -> -Packages or go to http://pub.buetow.org/yChat/CPP-yChat . +Packages or go to http://programming.buetow.org/CPP-yChat . -For CVS download type: +For CVS download type also look at the homepage please. -cvs -d:pserver:anonymous@buetow.org:/usr/home/cvs/cvsroot login -( You will be asked for a password. Use "just enter" ). +1.3.1 INSTALLATION: -vs -z3 -d:pserver:anonymous@buetow.org:/usr/home/cvs/cvsroot co ychat -( The sources will be copied into your local folder ) +Invoke "./configure" and afterwards "make", edit the conf.txt. -cvs -d:pserver:anonymous@buetow.org:/usr/home/cvs/cvsroot logout -( Logs your CVS session out ). +Now we want to compile all the dynamic loadable modules of ychat. +Invoke "cd cmnd && ./compile.sh && cd -". All command modules should get +compiled. -Now you may continue with the installation. +Now its time to run the server with ./ychat. +Then point your webbrowser to http://yourip:port ! -1.3.1 INSTALLATION: +... have fun :-). -Invoke "./configure". Afterwards you will get prompted with the before-compile -options of yChat. After choosing those options you are ready to type "gmake" -afterwards. - -//<<* -If you have choosen MySQL database support, then take a look at section 1.3.2 -how to setup a valid database table. Be also sure to enter the valid MySQL -accessing data in the yChat configuration file which is normally located in -the etc/ychat.conf file if not changed by you with the yChat configurator. -//*>> - -You may also invoke gmake with the following options (the PREFIX can be set -in the yChat configurator which will be launched by the top configure script -or gmake config): - - gmake or gmake all (compiles everything, also modules) - gmake base (only compiles the base) - gmake base_start (only compiles the base and starts the server) - gmake clean (cleans everything) - gmake clean_base (only cleans the base obj and rpo files) - gmake clean_modules (only cleans the modules .so files) - gmake config (runs yChat configurator) - gmake deinstall (deinstalls ychat from PREFIX) - gmake gpl (shows the GNU General Public License) - gmake help (shows all available ychat gmake targets) - gmake install (installs ychat to PREFIX) - gmake modules (only compiles modules) - gmake mrproper (same as gmake clean plus removing all temp files) - gmake setup (runs all configure scripts and afterwards gmake all) - gmake start (compiles everything and starts the server) - gmake stats (generates ychat statistics) - gmake uninstall (same as deinstall) - gmake version (shows the current version of yChat) -//<<* - gmake yhttpdbase (generates an yhttpd code base) -//*>> (See section 1.9 to read about this marks) - -Example: "gmake all install clean" compiles everything, installs it to PREFIX -and cleans the source directories. - -Now its time to run the server with ./bin/ychat. - -Aferwards point your webbrowser to http://yourip:port ! +1.5.0 CUSTOMIZATION: -... have fun :-). +If you like to customize the design/layout/language of yChat, you will have +to edit msgs.h and glob.h before you compile the sources. Afterwards you can +change the html-template files which are placed in the html/ subdirectory. +Dynamic loadable modules can be found in the cmnd/ subdirectory. -1.3.2 INSTALLATION QUICK START: - -If you in hury, then you may just type gmake setup. In the yChat configurator -you may just choose all the default values. If done, yChat will get compiled -and is ready to run with ./bin/ychat! - -//<<* -1.3.3 MYSQL SETUP - -If you chose to use MySQL database support you have to create a valid database -to use with yChat. - -Create a new MySQL database called 'ychat' and type the following command into -a MySQL command line client of your choice: - -USE ychat -CREATE TABLE `user` ( - `uid` int(10) NOT NULL auto_increment, - `nick` varchar(30) NOT NULL default '', - `password` varchar(30) NOT NULL default '', - `color1` varchar(30), - `color2` varchar(30), - `email` varchar(50) default '-', - `registerdate` varchar(30) default '-', - `logincounter` varchar(10) default '0', - `status` char(1) default '3', - PRIMARY KEY (`uid`), - KEY `uid` (`uid`) -) TYPE=MyISAM; -GRANT ALL PRIVILEGES ON ychat.* to ychat@localhost IDENTIFIED BY "yctest"; - -This database uses the default MySQL access informations which are stored in the -ychat.conf file. -//*>> - -1.4.0 HOW TO USE SCREEN WITH YCHAT: - -If you are running yChat in ncurses mode you might want to install -the tool which is called "screen". This will enable you putting the -ncurses interface into the background, closing the terminal session -and reusing the interface later through another terminal. - -Just do: - - screen -S ychat ./bin/ychat ( creates a new session and starts yChat in it ) - ctrl+d+a ( will detach the yChat session ) - ( closing the terminal ) - ( opening a new terminal ) - screen -r ychat ( will return you to the yChat process ) +1.6.0 FILES: ( This list is not complete ) -Screen will terminate automaticaly if all processes in its sessions are -terminated. +conf.txt - The yChat configuration file. ( read by conf.cpp ). -For a closer look read the screen manual page ( man screen ). +base.cpp - Encapsulates vector fields of room's or user ( may be later + hash_maps ) and provides methods for manipulating data + objects. -1.5.0 CUSTOMIZATION: +hmap.cpp - The hash map implementation which is a very fast data + structure. is needed for saving users, rooms and so on. -If you like to customize the design/layout/language of yChat, you will have -to edit src/msgs.h and src/glob.h before you compile the sources. Afterwards -you can change the html-template files which are placed in the html/ -subdirectory and the language-templates which are placed in the XML config -file (etc/ychat.conf). +main.cpp - This includes the required manager headers for starting + the server and finally regulates the correct starting. + +modl.cpp - The module loader. Stores pointers of all dynamic loaded + yChat modules in a hash map object and loads new modules + if desired or returns their pointers. -Notice, that you dont have to edit the src/glob.h file by hand any more, its -already done by the top ./configure script for you. +pool.cpp - The implementation of the thread pool. all threads are stored + in a queue. Each thread will be reused if the assigned job is + finished. -You can edit the etc/ychat.conf to fit your needs. If you dont want to change -the config file, then you also can use ychat start parameters. +reqp.cpp - This class implements the http request parser. If a client + starts a request to the server the reqp class will be + invoked. -Exmpl: ./bin/ychat -o chat.database.password secretpassword +room.cpp - Specifies a chat room. For each chat room an instance of + this class exists. -You can also use multiple words for a specific option. +thrd.cpp - This class is needed by sock.cpp while creating a POSIX thread. + All data which a thread n |
