RALF'S CHAT V.10
TRADUCAO PARA O PORTUGUES POR MARCELO CONTART / CGI-BRASIL

O site oficial est em http://www.ralfchat.de
O site CGI-BRASIL est em http://www.brasilsites.com/cgi

COPYRIGHT

The Script and this readme may only be given away "as is", unmodified
and complete. The Script is Freeware. Created and Copyright 1999 by
Ralf Gueldemeister <ralf@ralfchat.de>. You are not allowed to sell
this script. If you want to use it for commercial purpose mail me.

INSTALACAO

- Copie os arquivos chat.cgi, chat2.cgi e  config.pm em algum lugar no servidor 
  onde possa rodar cgi-scripts 
- chmod 755 chat.cgi (a+rx), chmod 755 chat2.cgi
- mkdir data no mesmo diretrio
- chmod 777 data (a+rw)
- Caso deseje logs: mkdir logs; chmod 777 logs

Configurao:

Esta  alista de variveis para configurar:

$data_dir - data directory like "data" 
$unknowncmd_msg - msg when command is unknown
$unknownnick_msg - msg when nickname is unknown
$help_msg - msg printed on /help
$about_msg - msg printed on /about
$welcome_msg - msg printed when user logs in, leave empty if you dont want
    a welcome msg
$masterpassword - Masterpassword for special commands, you should change this
$wrongmasterpass_msg - msg printed when wrong mpw was used at a special cmd
$updatefrequence - number of seconds the chat updates itself
$clear_old_msgs - set to 1 if you want that old msgs are deleted when the chat is empty
$nocleantime_msg - printed if no number of days in /clean_old_nicks is given
$message_limit - number of maximal (public) messages in the chat window
$new_msg_on_top - set to 1 if you want new messages printed on top, to work around the msie bug
$admin_email_address - Your email address (replace @ with \@) NEW
$mailprogramme - Path to the mail-transport-agent NEW
$mail_on_new_registration - set to 1 if you want to be mailed when a new user registers NEW
$logtype - The type of log you wish: 0 - no log, 1 - registrations, 2 - +logins, 3 - +messages NEW
$log_dir - directory for log files NEW
$script_name - filename of the script like "chat.cgi" NEW
$script2_name - filename of the second cript like "chat2.cgi" NEW
$max_users - the maximal number of users in the chat at the same time, set to "-1" if unlimited NEW
$login_msg - MSG printed when user logs in without "user" NEW
$logout_msg - MSG printed when user logs out without "user" NEW
$days_to_keep_memos - Number of days to keep memos NEW
$min_update_freq - the minimum update frequency NEW

Files - voc no precisa mudar nada aqui:
$data_msg_file - the message file
$data_stillalive_file - the stillalive file
$data_private_file - private files (without .user)
$data_nicks_file - the nick file
$data_userinfo_file - user info database file NEW
$data_banned_file - banned user file NEW

Html
$html_bodytag - The bodytag html files NEW
$html_title - The title of your chat NEW
$banner_picture - the banner picture, set to "" if you don't want any banner NEW
$banner_link - The banner link NEW
$logout_url - the url for the logout-link NEW
$input_field_size - the size of the msg input field NEW

All the HTML files are in the html part directly after the config part

KNOWN BUGS

-

FAQ

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 data directory should I use?
A: The best way is to choose a directory outside the www-accessable root maybe
   in your home directory. Else it could be possible that everyone can read
   the datafiles. You should check that.
Q: What is the masterpassword or how do I login as administrator?
A: There is no special account for administration. You have to login as 
   normal user and use the masterpassword for special command like
   /list_nicks mpw in the chat.
Q: How to setup mutiple chats?
A: Simply copy chat.cgi chat2.cgi config.pm and rename them like chat2.cgi 
   chat22.cgi config2.pm, then change "use config;" in chat2.cgi and 
   chat22.cgi to "use config2;". Adapt SCRIPTLINKS.HTML and CHATFRAMES.HTML 
   (commented lines). Set in config2.pm $script_name = "chat2.cgi",
   $script2_name = "chat22.cgi", $data_msg_file = "messages2",
   $data_stillalive_file = "stillalive2".
Q: How can I view the number of users currently online on a shtml page?
A: Simply add to the shtml page "<!--#include virtual="/cgi-bin/chat2.cgi?
   action=show_users"-->".
Q: Can I made a wave to be played when an user logs in/out?
   Sorry, this question isn't answered yet. My first idea didn't work.
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 allow html in messages?
A: Allowing html in messages is a very big security problem. If you really know 
   what you do search for "# kill html-tags" in chat.cgi and remove this and the 
   next line.

CHANGES

- Version .10
userinfo
mail to admin on new user-registrations
show number of online users via SSI
logging function
multiple script support
fixed user"s"-bug
fixed bug: possiblitiy to send private msgs without text
added drop-down menu with active nicks for private messages
added command /userinfo
fixed autolinking function
fixed clean_old_nicks sub
added logout link
nick may contain only letters, numbers, and the underdash
usernames are not case sensitive at login
splitted script
fixed stole_priv_msg bug: http://URLchat/chat.cgi?action=chat&name=NICK
added $html_bodytag, $html_title, $banner_picture, $banner_link
logon/logoff msgs
added maximal user limit, users can login anyway with the masterpassword
added ban, kick and unban features
leave msg for offline users function (/memo)
added ip, number of memos and status to /list_nicks
added $min_update_freq
added option change password
added lost password function
added password again field at registration

- Version .11 (still in process)
fixed print "<H1><I>$nrusers user$s online</I></H2>";
fixed kick function
banner -> _top

TODO

?add real mutiple rooms
?private rooms
autokick
/ignore
check sa in postmsg function or chat main frame
small pictures beside username
realtime version
pause button
special memo area for reading, writing and deleting memos, hint if new memos available in chatframe
admin: memo to all users
noframes version
buttons as pictures (logout, options..)
check /remove_nick 
/topic mpw
/away - "be right back" pic next to username
_top --> _parent
check /clean_nicks mpw 1000 (1000 is to be sure no one is killed).
check login/out msgs
check unwanted logout of users
check webtv and ie4.0
if ($sa[$i] < (time - 50)) { # ist zeitstempel schon aelter als 50s?  --> 70 s
add "
sub chat_html_footer {
    print <<"[END]";
<SCRIPT lanugage="javascript">
     document.location = "#end"
</SCRIPT>
</BODY></HTML>
[END]
}
" to work around MSIE BUG

THANKS

- to Dusan Ilic for many great ideas and suggestions and the Swedish version 
- to Robert Mays for the MSIE bug workaround 
- to Ricardo Curto for the Spanish version 
- Jean-Michel Laine for the French version 
- to Merk and the other beta testers for beta testing and bug tracking 
- to my brother who supported me whenever possible 
- White Russian Bear for the Russian Version 
- Maxy for the Polish Version 
- Merlyn for the German version 
- Jones for the Finish version 
- Eddie Walker, Christopher M. Doyon, Lasar Liepins, ElefaNT, Erik Scholtz, 
  Sascha Weihoenig, Swift 
- to everyone else using my script for help me keeping the script alive 