RALF'S CHAT V1.3 http://www.ralfchat.com COPYRIGHT Copyright 1998-2006 Ralf Gueldemeister 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 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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 SECURITY Please read the following points carefully: - If you use the flat file version secure your data directory: Either put it out of the www root /home/user/www/chat/ /home/user/data/ and set $data_dir in config.cgi accordingly. Or use a .htaccess file to protect the data directory. If you don't take care of this it could be possible that everyone may read the data files! - Change the master password: It is really important to change the master password, otherwise everyone may execute the master commands like /kick, /ban, /userlevel.. Change $masterpassword in config.cgi! - Try to chmod 700 (only owner may read, write and execute) all files and directories, especially if you are on a virtual server. If this doesn't work use the given permissions (755/777). INSTALLATION - read the security section - change $masterpassword in config.cgi DBI: - edit config.cgi and set the DBI user, password and database in lines 95-100 - upload *.cgi, html/*, cmd/* and lang/* (all in ASCII mode!) somewhere on your server where cgi-scripts are allowed - upload www/* somewhere outside the cgi-bin, set the according path in config.cgi ($www_dir) - chmod 755 *.cgi (owner all, group and others read and execute) Flat File: - make the data directory "data" (read the security section) - chmod 777 data (all read, execute and write) DBI: - run the DBI script with http://yourserver/path/dbi.cgi - If you want to update a running Ralf's Chat choose "update from file to DBI" - Else "Create DBI tables" - if you want logs: mkdir logs; chmod 777 logs - if you want to use the setup script config.cgi must be writable by the webserver: chmod 666 config.cgi Goto http://yourserver/path/setup.cgi and configure your chat. When finished you should secure config.cgi: chmod 644 config.cgi - run the chat script with http://yourserver/path/chat.cgi - register your nick, login and get admin rights with "/userlevel nick 2 mpw". - then type "/help" to get an overview of the commands UPDATE FROM 1.1 TO 1.2 - run "cd scripts;perl update_1.2.pl" UPDATE FROM 1.2 TO 1.3 - run "cd scripts;perl update_1.3.pl" DBI VERSUS FLAT FILE Ralf's Chat can use two different methods for saving the chat data: DBI and Flat File. You can either use the Data Base Interface for MySQL to save all data in a MySQL data base or the Flat File version saving the data in simple text files. Generally the standard package contains both methods but you may remove the unneeded part using the remove.pl script ("perl remove.pl DBI" or "perl remove.pl NODBI"). I recommend the DBI version as it is more stable and it supports streaming. Of course the DBI version requires a MySQL data base. CONFIGURATION You can configure the chat script in the config.cgi file. You should at least change $masterpassword. All the HTML files are inside the cgi files in the html sub directory. You should only edit these files if you are familiar with Perl. FAQ Q: How do I change the Perl path? A: Just edit the first line (#!/usr/bin/perl) of all cgi-files in the main directory (chat*.cgi and dbi.cgi). Typical values are: "#!/usr/bin/perl5" or "#!perl.exe". Q: Can I use this script with Windows? A: For using the chat under Windows you have to try the following hints. - set $flocking to 0 (in config.cgi) - Set the Perl path to "#!c:\path\perl". When testing the script with Windows 98, Apache and Active Perl, it worked after doing these two steps. - in config.cgi change $data_dir to "/your_absolute_www_path/path_to_chat/data" - rename *.cgi to *.pl and change $script*_name accordingly Good luck! Q: I always get the error "creating data/nicks failed", what is wrong? A: You forgot to create the data-directory "data" and/or to chmod 777 (all all) it. Q: What is the masterpassword or how do I login as administrator? A: There is no special account for administration. You can set the admin rights with /userlevel. Q: How can I view the number of users online? A: SSI (SHTML): "" or "" PHP: "" Q: How can I view the names of the users online? A: SSI (SHTML): "" or "" PHP: "" Q: I get lots of errors running the script, what is wrong? A: You probably have Perl 4 installed. But Ralfs Chat requires Perl 5. Try to set the path in the first line to #!/usr/bin/perl5. Else update your Perl version. Q: How can I add super users? A: Just enter "/userlevel nick 1" if you are an admin. Q: What does chmod mean? A: Chmod (change mode) is the command to set permissions on UNIX systems. You can chmod files either via Telnet (enter chmod 777/755 file) or in your FTP-Programme (try right click on the file, check your FTP-manual). Q: How do I enable multiple rooms? A: Just set $room = 1 and adapt %rooms and %welcome_msgs to your needs. CHANGES new features (un)ignore users (via options) user color in online list new variable $www_dir pointing to directory outside the cgi-bin containing static content like html files, css files or images better css support (classes), css file support setup script for basic configuraion via a web browser new commands /userlevel - display own userlevel /userlevel username - display userlevel of another user /ignore username - ignore user /unignore username - unignore user bug fixes fixed message order in DBI mode (messages from same process) fixed bug 679071 MSIE: javascript in photo_url minor changes don't show empty welcome message (from language file) mod files: add final \n to add after/before field (chatmod compatibility) replaced "copy ralf" with about link added $streaming to config.cgi for selecting default output method patch 1.2.1 changed bad word filter considers word boundaries smiley replace is case insensitive login sound support for non-local URLs and MSIE 6 security enhancement in setoptions method TODO add guest mode group online users on room, use user color setup: add support for rooms, userlevels, replace, actions, bad words Log failed logons /memo_admins, memo all administrators private rooms (negative room numbers) /seen /kick_all /clear admin: shortcuts in user online list for ban/kick.. /html (post html message) auto kick userlist in new window add language select field to options change login sound behaviour: remote sound file, enable box in options THANKS - all developers, the beta testers, the translators and donators - to my brother who supports me whenever possible - Markus and The X-Files World Order for inspiring me - to everyone else using my script for help me keeping the script alive