DigiChat v4.0 Product Documentation. © 2002
Transcription
DigiChat v4.0 Product Documentation. © 2002
DigiChat v4.0 Product Documentation. © 2002 Digi-Net Technologies, Inc. All Rights Reserved. DigiChat™ v4.0 Documentation – Table of Contents I. Overview 4 A. Copyright and Legal Disclaimers 4 B. Product Overview 4 II. Installation 5 A. Server 5 1. Requirements 2. Installing DigiChat Using Auto-Install Wizard 3. Installing DigiChat Manually 5 5 7 B. ChatMaster 8 1. Requirements 2. Installing ChatMaster 8 8 C. Applet 9 Integrating DigiChat into Your Web Page 10 III. Launching and Running DigiChat Server 12 IV. DigiChat Server Configuration 13 A. Command Line Parameters 13 B. HTTP Tunneling Servlet Configuration 15 IV. Launching and Running DigiChat ChatMaster 15 A. Overview 15 B. Launching the ChatMaster 15 C. Logging into DigiChat Server 16 V. DigiChat Configuration Using ChatMaster 17 A. Server Configuration 17 B. Site Configuration 31 VI. DigiChat Applet Configuration A. DigiChat Applet Parameters 59 60 B. File Transfer Functionality 63 C. Buddy List Functionality 65 D. Membership Database Integration 66 VII. Moderated Chat Functionality Using ChatMaster 67 A. Overview 67 B. Conducting Moderated Chat 68 DigiChat‰ v4.0 Product Documentation 2 ©2002 Digi-Net Technologies, Inc. C. Moderator Control 68 VIII. DigiChat Bots 72 A. Overview 72 B. Running Your Bot 72 C. Getting New Bots 72 D. Creating Your Own Bots 73 IX. DigiChat Commander 83 A. Overview 83 B. Command Line Interface 84 C. Java API 90 DigiChat‰ v4.0 Product Documentation 3 ©2002 Digi-Net Technologies, Inc. Overview Copyright and Legal Disclaimers © 2002, Digi-Net Technologies, Inc., All Rights Reserved. This document and all content that is contained, embedded, and linked to this document and that is written by Digi-Net Technologies, Inc., or its partners or affiliates is copyrighted and bound by all copyright laws. This document is the property of Digi-Net Technologies, Inc. and/or its affiliates and contains public information about proprietary products and/or services. All information contained herein is the property and exclusive copyright of Digi-Net Technologies, Inc. No information within this document, nor information about the products or services described in this document, may be distributed or copied without the expressed written consent of Digi-Net Technologies, Inc. Product Overview Below is a brief description of the DigiChat product suite and its features and functions. DigiChat Server: The "engine" that powers your DigiChat system. It is capable of handling hundreds of independent chat sites and thousands of concurrent users on a single server. DigiChat’s scalability is based upon a highly optimized and highly multi-threaded core. The server can take advantage of Symmetric Multiple Processors (SMP) with an appropriate Java Virtual Machine. DigiChat ChatMaster: Connects to the DigiChat Server to perform server and site-level operations, administration and configuration tasks. By logging on as an administrator, you can configure the server and setup chat sites. By using the ChatMaster or other authenticated login account, you can perform site-specific functions, such as actively participating in any chat room (just like a normal chatter), but with full chat site administrative capabilities. DigiChat Commander: A low-level communications and command architecture that allows you to send queries and commands to the DigiChat Server. Commander can be accessed from any application or service with access to a command line or through a Java-based API. DigiChat Applet: The chat client that end-users of the product enter and interact with on your DigiChat system. The applet downloads dynamically from the DigiChat Server ensuring that your users always enjoy the latest most up-to-date version of DigiChat. A Java-compliant Web browser is the only requirement for using the DigiChat Applet (Internet Explorer or Netscape 4.x or better is recommended for optimal performance). DigiChat Bot: DigiChat offers the DigiChat Bot API, which can be used to create a uniquely customized chatroom experience. The Bot API, which utilizes the Java programming language, can be used to create a user or ‘program’ in the chat room and specify their actions based on any number of events that occur. These bots can be configured to do a number of functions including, but not limited to, retrieving user list information, automatically kicking and banning disruptive users, returning live weather information, and much more. DigiChat‰ v4.0 Product Documentation 4 ©2002 Digi-Net Technologies, Inc. Installation Server Requirements Hardware The exact hardware requirements to run the DigiChat Server depends upon the amount of traffic your chat sites will generate, the number of sites you host and the other services you run simultaneously on the same machine. Generally, we recommend at least a 333MHz or faster processor and at least 128MB of RAM. The DigiChat Server also requires a dedicated Internet connection. This connection should be digital, with a minimum of 128k of available bandwidth. (More bandwidth is required to support more users) DigiChat’s capacity scales with your system; therefore, the more powerful system you run, the more simultaneous connections and sites the server can support. Software DigiChat is a Java‰-based application. In order to run the software you must first download and install a Java Virtual Machine (JVM). It is the JVM that actually executes the DigiChat Server program. You must use a JVM that is compliant with the Java 2 Runtime Environment. We recommend using Sun’s Java Runtime Environment (JRE) v1.3.1_02. There are versions of a Java 2 compliant JVM available for Microsoft Windows, all Intel-based Linux distributions, as well as SPARC Solaris. You can download the Java 2 Runtime Environment from Sun at the following address: http://java.sun.com/j2se/1.3/. Mac OS X‰ includes JRE 1.3.1 by default. Installing DigiChat Server Using Auto-Install Wizard Download and run the DigiChat Installation program for your Operating System. You will be asked a few questions about the location of your JVM and where you would like to install DigiChat. After the DigiChat Server finishes the installation process, you will be asked a few questions about your server’s configuration. The answers to these questions will be used to automatically setup your DigiChat Server and automatically configure the DigiChat Applet. Answer each question based on your server’s setup. Below is a list of everything the setup wizard will be asking you: Company Name: This is the name that you registered the product with; if you are evaluating DigiChat using the demo license included with the installer, please leave the default value as “Evaluation.” Order Number/Serial Number/Key: These are provided by Digi-Net as your license to the software. If you have not yet obtained a DigiChat Serial Key, the Server will run for 72 hours without a license. To do this, enter any value for the ‘Company Name’ and click ‘Next’. DigiChat‰ v4.0 Product Documentation 5 ©2002 Digi-Net Technologies, Inc. Web Root: This is your Web server’s document root location. If you have multiple Web roots hosted on the same machine, choose the same one that will be associated with the hostname you will be specifying. This directory location is dependent on your particular Operating System (OS) and Web Server configuration. Below are the default values for some OS / Web Server configurations: Windows / IIS: Mac OS X / Apache: Linux / Apache: C:\Inetpub\wwwroot /Library/WebServer/Documents /var/www/html (NOTE: These are just default values. You will need to check your specific configuration for the correct location) Hostname: This is the IP (Internet Protocol) address or host name of the machine running the DigiChat Server. (e.g. www.yourserver.com, or 192.168.0.100) The installer will try to ‘guess’ your machine’s address. If this address is correct, you can leave this value unchanged. After the installation program has completed the setup process, DigiChat is fully installed and configured for your server. You will then need to start the DigiChat Server; instructions for this are located on page 12. After the server is started you can begin using DigiChat. You can access configured templates of your DigiChat applets using the following URL: http://yourserver.com/DigiChat/index.html Where ‘yourserver.com’ is the IP Address or host name of the machine running DigiChat. Console Mode Install for Non-Graphical Installs If you are installing the DigiChat Server onto a UNIX/Linux server remotely through ssh or telnet, and do not have an X-Windows session available to you, you will need to run the DigiChat installer in the ‘console’ mode. To do this, you will follow the same steps outlined above for the Auto-Install Wizard, and will use the same installer file as the graphical install. You will need to launch the installer using the following commands to enable the console-mode installation: ./Install_DigiChat.bin –i console You will be prompted for the same information as the graphical installation procedure described above. DigiChat‰ v4.0 Product Documentation 6 ©2002 Digi-Net Technologies, Inc. Configuring the DigiChat Server Manually The Installer will automatically configure the DigiChat Server for use. However, if the automated installation fails, we are providing manual instructions for the configuration of your DigiChat Server. 1. Run the DigiChat Installer. 2. Launch the DigiChat Server using the instructions for your operating system on page 12 in the Section, Launching and Running the DigiChat Server. 3. Run the DigiChat ChatMaster using the instructions for your operating system on page 19 in the Section, Launching and Running the DigiChat ChatMaster. 4. Login to your DigiChat Server using the ChatMaster program with the following information: Nickname: Password: Host: Site ID: Admin DigiChat Your Machine’s IP Address / Hostname (use 127.0.0.1 for localhost) 0 (Site reserved for server settings) 5. The DigiChat Admin Window will then be displayed. Select the ‘Set Server Options’ from the ‘DigiChat’ pull down menu. 6. Select the ‘Keys’ Tab and enter the Serial Keys provided to you by Digi-Net. 7. Select the ‘Sites’ Tab and click on the ‘Add Site’ option. Create a new site by entering the required information. 8. Click on the ‘Save’ button to save your settings and then close the DigiChat Admin window. 9. Then log in again using the ChatMaster program. However, this time use the following login information: Nickname: Password: Host: Site ID: ChatMaster The name of the site you just created as Admin. Your Machine’s IP Address / Hostname (use 127.0.0.1 for localhost) 1000 (The site you just created.) 10. At this point you are now logged into your chat room and can start configuring it to your liking. All configurations are done through the ‘Set Site Options’ menu from the ‘DigiChat’ drop-down menu. Full instructions are detailed in the DigiChat ChatMaster Section on page 31 in the section entitled, Site Configuration. 11. You will also want to begin to configure your DigiChat Applet, so that your Web site visitors can access the chat. This is described on page 8 in the section, Installing the DigiChat Applet. NOTE: If your DigiChat Server does not respond (i.e. Can’t login with ChatMaster) and begins to use a great deal of the CPU resources, you will need to manually set the location of your Web root directory. You can do this from a command prompt in the directory where DigiChat is installed: java –cp Server.zip com.diginet.digichat.server.ChatServer resetwebroot DigiChat‰ v4.0 Product Documentation 7 ©2002 Digi-Net Technologies, Inc. ChatMaster Requirements Hardware We recommend at least a 333MHz or faster processor and at least 128MB of RAM. The DigiChat ChatMaster also requires a live Internet connection to remotely connect to the DigiChat Server. A faster connection will yield better performance. Software DigiChat is a Java‰-based application. In order to run the software, you must first download and install a Java Virtual Machine (JVM). It is the JVM that actually executes the DigiChat ChatMaster program. We recommend using Sun’s Java Runtime Environment (JRE) v1.3.1_02. There are versions of a JVM available for Microsoft Windows, all Intel-based Linux distributions, as well as SPARC Solaris. You can download the Java 2 Runtime Environment from Sun at the following address: http://java.sun.com/j2se/1.3/. Mac OS 9 requires MRJ 2.2.5. Mac OS X‰ includes JRE 1.3.1 by default. Installing ChatMaster Obtain the installer for your operating system from http://www.digichat.com/downloads/. You will be given the option of installers with and without a Java VM. If you have not already installed a JVM, choose the one that comes with its own VM. Run the installer. The installer will ask a few questions about where you want to install DigiChat, and which JVM to use. Answer each question according to your specifications. You can then launch the ChatMaster using the instructions for your operating system from page 15, the section entitled, Launching and Running the DigiChat ChatMaster. DigiChat‰ v4.0 Product Documentation 8 ©2002 Digi-Net Technologies, Inc. Installing the DigiChat Applet In order to allow users to chat on your site, the DigiChat Client Applet needs to be included in a Web page on your server. The initial setup wizard places the client applets in your Web root directory, inside a corresponding DigiChat folder (i.e. C:\Inetpub\wwwroot\DigiChat ). Copies of the client applets are contained in a folder named “HTML Templates” in your DigiChat program directory. There are 3 main applets included with the DigiChat: regular applet, lite applet and ChatMaster applet. The corresponding signed applets allow for the enabling of the file transfer functionality, which is not included in the lite Applet. The applet codes are contained inside the following files: Regular Applet Chat.html ChatSigned.html Description Allows for general access to the site using the regular chat applet. The actual parameters, which define how the applet is configured are contained in the ‘chat.js’ file. The ‘chat.js’ file is referenced by the ‘Chat.html’ file. Enables file transfer functionality for regular applet. The actual parameters, which define how the applet is configured are contained in the ‘chatSigned.js’ file. The ‘chatSigned.js’ file is referenced by the ‘ChatSigned.html’ file. Lite Applet Description DCLite.html Allows for low-bandwidth access to the site. Site graphics and profile information are disabled. There is no .js file associated with this template file. All applet parameters are contained directly in this file. ChatMaster Applet Description Chatmaster.html ChatmasterSigned.html DigiChat‰ v4.0 Product Documentation In addition to the ChatMaster application, this allows for administrative access to the site via a web-based interface. This allows you to configure and administer DigiChat from and browser, without the need to install the DigiChat ChatMaster application. The actual parameters, which define how the applet is configured are contained in the ‘chatmaster.js’ file. The ‘chatmaster.js’ file is referenced by the ‘ChatMaster.html’ file. Enables file transfer functionality for ChatMaster applet. The actual parameters, which define how the applet is configured are contained in the ‘chatmasterSigned.js’ file. The ‘chatmasterSigned.js’ file is referenced by the ‘ChatMasterSigned.html’ file. 9 ©2002 Digi-Net Technologies, Inc. Integrating DigiChat into Your Web Page Open the HTML Template in a text editor of your choice in order to view the applet code (i.e. NotePad, TextEdit, WordPad, Pico, SimpleText). Make a copy of the applet by highlighting the section that begins with the ‘ START APPLET CODE ‘ tag and ends with ‘ END APPLET CODE ‘. Below is the default applet code contained in each HTML Template. Copy and paste the selected applet code into the desired location in the Web page that you wish the DigiChat applet to appear on. NOTE: We recommend using a standard Text Editor, instead of FrontPage or any graphical WYSIWG HTML editing software, due to issues that users have encountered regarding the corruption of the Java applet code. Chat.html (Regular Chat Applet): <!-- *** START APPLET CODE *** --> <script language="Javascript" src="chat.js"></script> <!-- *** END APPLET CODE *** --> NOTE: The above applet code assumes that the ‘chat.js’ file is in the same directory as the HTML page this code is being copied to. If this is not the case you must change the reference in the src=”chat.js” definition to reflect the actual location relative to the final HTML page. ChatSigned.html (Regular Chat Applet – Signed): <!-- *** START APPLET CODE *** --> <script language="Javascript" src="chatSigned.js"></script> <!-- *** END APPLET CODE *** --> NOTE: The above applet code assumes that the ‘chatSigned.js’ file is in the same directory as the HTML page this code is being copied to. If this is not the case you must change the reference in the src=”chatSigned.js” definition to reflect the actual location relative to the final HTML page. ChatMaster.html (ChatMaster Applet): <!-- *** START APPLET CODE *** --> <script language="Javascript" src="chatmaster.js"></script> <!-- *** END APPLET CODE *** --> NOTE: The above applet code assumes that the ‘chatmaster.js’ file is in the same directory as the HTML page this code is being copied to. If this is not the case you must change the reference in the src=”chatmaster.js” definition to reflect the actual location relative to the final HTML page. Chat.html (ChatMaster Applet – Signed): <!-- *** START APPLET CODE *** --> <script language="Javascript" src="chatmasterSigned.js"></script> <!-- *** END APPLET CODE *** --> NOTE: The above applet code assumes that the ‘chatmasterSigned.js’ file is in the same directory as the HTML page this code is being copied to. If this is not the case you must change the reference in the src=”chatmasterSigned.js” definition to reflect the actual location relative to the final HTML page. DigiChat‰ v4.0 Product Documentation 10 ©2002 Digi-Net Technologies, Inc. DCLite.html (Lite Chat Applet): <!-- *** START APPLET CODE *** --> <APPLET NAME="DigiChat" CODEBASE="http://yourserver.com/DigiChat/DigiClasses/" CODE="com.diginet.digichat.liteclient.DigiChatLiteApplet" WIDTH="200" HEIGHT="100" ALIGN="MIDDLE" ARCHIVE="DCLite.jar"> <PARAM NAME="siteID" VALUE="1000"> <PARAM NAME="cabbase" VALUE="DCLite.cab"> <PARAM NAME="background" VALUE="FFFFFF"> <PARAM NAME="textcolor" VALUE="000000"> DigiChat requires a Java Compatible web browser to run. </APPLET> <!-- *** END APPLET CODE *** --> For additional information about configuring your DigiChat Applet, please refer to the section titled “DigiChat Applet Configuration” on page 52 of this document. DigiChat‰ v4.0 Product Documentation 11 ©2002 Digi-Net Technologies, Inc. Launching and Running DigiChat Server The DigiChat Server performs the behind-the-scenes operations that ensure your chat sites are working. The Server accepts connections from clients and sends and receives data to and from these clients to enable the real-time, interactive chat. The Server is responsible for processing incoming and outgoing messages, whether it is from the Client Applet, ChatMaster, or Commander. It also maintains settings for your Server and for each chat site. All of this work is done transparently; you do not interact with the Server directly. Instead, the Server accepts connections from the ChatMaster and Commander applications to allow remote administration of the Server and individual chat sites. Use the table below for information on launching the server. Platform Launching Instructions Mac OS 9 Mac OS X v10.x Double-click the DigiChat Server application icon in your installation directory. Windows 95/98/ME Select Server from the DigiChat Programs group of your Start menu. (If you are running the DigiChat Server as a service on Windows NT, see the following section.) Windows NT/2000/XP Use method described above, or use the DigiChat Server Service installed in your ‘Services’ Control Panel. UNIX Change directory (cd) to your installation directory, then enter ./DigiChat_Server at the command prompt. Other Platforms (Command Line) If the above command does not work or if you are not using UNIX, you must manually invoke your Java Virtual Machine. Please refer to your Java Virtual Machine's documentation for information on launching a Java application. Set the classpath to Server.zip and enter the main class name, which is com.diginet.digichat.server.ChatServer. The command typically resembles one of the following: java -cp Server.zip com.diginet.digichat.server.ChatServer jre -cp Server.zip com.diginet.digichat.server.ChatServer Some virtual machines may require you to append ".class" to the commands given above. DigiChat‰ v4.0 Product Documentation 12 ©2002 Digi-Net Technologies, Inc. DigiChat Server Configuration Command Line Parameters There are several command-line parameters that can be used to modify the Server’s behavior. Command-line parameters can be specified in multiple ways depending on what method you use to start the server in the OS you are using. If you start the server using a command-line, you can add the parameters to the end of the command. If you start the Server as a service or by just launching the application, you can add the parameters by creating a text file in the DigiChat installation directory labeled ‘parameters’. This file should not have an extension of any kind, and should contain each parameter you would like to pass to the DigiChat Server. Put one parameter per line in this text file, with no spaces in your parameters themselves. If you are specifying a filename that has spaces, put double-quotes around the filename. For example, below is the contents of a parameters file which will change the default port DigiChat uses, create an error log file and enable the sync between DigiChat and DigiPosts: parameters out=out.txt err=err.txt ports=8396 digiposts If starting the DigiChat Server manually from the command line, parameters can be added in the following format: java -cp Server.zip com.diginet.digichat.server.ChatServer parametername (Run this command in the DigiChat Installation directory) DigiChat‰ v4.0 Product Documentation 13 ©2002 Digi-Net Technologies, Inc. Parameter Definition out=filename This parameter enables all console output to be written to a file. Add this parameter and a text file will be created using the file name you specified which will contain all normal console output generated by the DigiChat Server. err=filename This parameter enables all error output to be written to a file. Add this parameter and a text file will be created using the file name you specified which will contain all error messages generated by the DigiChat Server. ports=w,x,y,z Replace w,x,y,z with the desired ports. You may specify as many ports as you like. The server will listen to all the TCP ports you specify instead of the default list of 7 (so if you want to use any of them, you must include them). Use the corresponding applet and ChatMaster parameter, “ports”, to tell the applet and ChatMaster to use the same set of ports. resetwebroot resetpassword digiposts To reset the Web root directory, make sure the Server is not running and start it with this parameter. To reset the Admin account password back to “DigiChat”, make sure the Server is not running and start it with this parameter. Add this parameter to enable the sync between DigiChat and DigiPosts. With this parameter added, all accounts created in DigiChat will be duplicated in the corresponding DigiPosts’ site, and vice versa. DigiChat‰ v4.0 Product Documentation 14 ©2002 Digi-Net Technologies, Inc. HTTP Tunneling Servlet Configuration The DigiChat client connects to the DigiChat server through six default TCP ports: 8396, 58396, 443, 110, 119, 25. Users that access the Internet from behind a firewall or proxy server will generally have those ports blocked on their systems. DigiChat will display an error when it is not able to access the necessary ports. In order to allow access to the applet for users behind firewalls and proxy servers, HTTP Tunneling functionality has been implemented with the DigiChat software. Generally, ports 80 and 8080 are available to users behind such systems. The HTTP Tunneling Servlet can listen on these ports and pass the connection to the DigiChat Server. A Servlet Engine is required in order to set up and run an HTTP Tunneling Servlet for use with the DigiChat Server. Digi-Net recommends two packages available for download on the Internet: ServletExec: This is a commercial servlet engine for the Windows NT/2000/XP platform that is available for purchase at http://www.servletexec.com. It can be integrated with Microsoft IIS in order to listen for requests on port 80. Tomcat: This is a freeware servlet engine available for nearly all platforms that is available for download at http://jakarta.apache.org/tomcat. It can be configured to run stand-alone on port 8080, or it can be integrated with Apache and Microsoft IIS to listen for requests on port 80. NOTE: Make sure to read the documentation provided for each product in order to better acquaint yourself with the software and its capabilities. ServletExec Configuration for Windows NT/2000/XP 1. Install ServletExec on your system and restart the Microsoft IIS services. 2. Using a ZIP archive utility (e.g. WinZip), extract the “Server.zip” file located in your DigiChat program directory into the “/classes/” or “/servlets/” directory found in your ServletExec installation folder (i.e. C:\Program Files\Unify\ServletExec ISAPI\). 3. Go to http://localhost/servlet/admin in a browser, find the “Servlet” section in the left frame and click on the "Configure" link to enter the Servlet Configuration page. Then Click on the “Add Servlet” button located on the page. 4. In the Servlet Name field enter: HttpTunnelingServlet 5. In the Servlet Class field enter: com.diginet.digichat.util.tunnel3.HttpTunnelingServlet 6. In the Name field enter: host and set the value to be the host address of the machine running the DigiChat Server. . 7. Click on the “Submit” button to save the servlet and minimize the browser window. 8. Make sure the DigiChat Server is started and running correctly. . 9. Go back to your browser, select the “Reload” checkbox for the servlet, then click on the “Reload” button. You will need reload the servlet every time the Digichat Server is restarted. DigiChat‰ v4.0 Product Documentation 15 ©2002 Digi-Net Technologies, Inc 10. Enter the “HttpServlet” parameter into the DigiChat Applet HTML code with the corresponding servlet URL value. By default, the URL value will be: http://HOSTNAME/servlet/HttpTunnelingServlet You will need to enter the actual host name or IP address. <PARAM NAME="HttpServlet" VALUE="http://HOSTNAME/servlet/HttpTunnelingServlet"> Tomcat Configuration NOTE: DigiPosts, the discussion forum software available with the Enclave Community Suite, uses Tomcat as its servlet engine. If you have DigiPosts installed on the server as well, you can use the Tomcat servlet engine available with it. Start DigiPosts normally instead of using "Tomcat start" (See step 5). In the “/WEBAPPS/ROOT/WEB-INF/” directory of the Tomcat installation (i.e. <TOMCAT_DIR> ), there is a “web.xml” file as well a “/classes/” and or “/lib/” directory. The web.xml contains all the configuration information for the servlets, and the classes directory is where Tomcat stores the class files for the servlets. 1. Using a ZIP archive utility, extract the “Server.zip” file located in your DigiChat program directory into the “/classes/” and or “/lib/” directory found in your Tomcat installation folder (i.e. <TOMCAT_DIR>/webapps/ROOT/WEB-INF/). 2. Edit the web.xml in the “/<TOMCAT_DIR>/webapps/ROOT/WEB-INF/” and add this servlet section in between the “<web-app>” and “</web-app>” tags: <servlet> <servlet-name> HttpTunnelingServlet </servlet-name> <servlet-class> com.diginet.digichat.util.tunnel3.HttpTunnelingServlet </servlet-class> <init-param> <param-name>host</param-name> <param-value>localhost</param-value> </init-param> </servlet> 3. Set the value of the “host” parameter to the host address of the machine running the Digichat Server, and Save the file. 4. Start the Digichat Server. 5. Start Tomcat. This can be done from a command line prompt by entering the “bin/” directory, located in Tomcat installation folder, and entering this command: Tomcat start 6. If the DigiChat Server is restarted, Tomcat will need to be restarted as well. This can be done in a command line prompt by entering the “/bin/” directory, located in Tomcat installation folder, and entering this command: Tomcat restart DigiChat‰ v4.0 Product Documentation 16 ©2002 Digi-Net Technologies, Inc 7. Enter the “HttpServlet” parameter into the DigiChat Applet HTML code with the corresponding servlet URL value. By default, the URL value will be: http://yourserver.com:8080/servlet/HttpTunnelingServlet You will need to replace yourserver.com with the host name or IP address of your DigiChat server <PARAM NAME="HttpServlet" VALUE="http://yourserver.com:8080/servlet/HttpTunnelingServlet"> NOTE: Since Tomcat uses port 8080 by default, you will need to keep the ‘:8080’ in the host name. Other Servlet Engine Configurations Make sure to read the documentation provided for your Servlet Engine software in order to obtain specifics on configuring the servlet for your system. Using a ZIP archive utility, extract the “Server.zip” file located in your DigiChat program directory into the main classes directory of your servlet engine. The following information will need to be configured: Servlet Name: HttpTunnelingServlet Servlet Class: com.diginet.digichat.util.tunnel3.HttpTunnelingServlet Parameter: Parameter Name: host Parameter Value: Host name or IP address of DigiChat Server (localhost will work) The product documentation will instruct you on how to add the above information. Once you have the servlet running, enter the “HttpServlet” parameter into the DigiChat Applet HTML code with the corresponding servlet URL value. By default, the URL value will be: http://yourserver.com/servlet/HttpTunnelingServlet You will need to replace yourserver.com with the host name or IP address of your DigiChat server <PARAM NAME="HttpServlet" VALUE="http://yourserver.com/servlet/HttpTunnelingServlet"> DigiChat‰ v4.0 Product Documentation 17 ©2002 Digi-Net Technologies, Inc Configuring DigiPosts Sync DigiPosts is a BBS system designed to seamlessly integrate with DigiChat. In order for the sync between the two products to function correctly it must be enabled on the DigiChat Server. To do this,add the command line parameter ‘digiposts’ to the ‘parameters’ text file, as documented at the beginning of this section. You must also add your JDBC driver to the CLASSPATH of your JVM. If you are using the default JDBC driver included with DigiPosts you can copy the file ‘drivers.jar’ out of the webapps/digiposts/WEB-INF/lib/ directory, in your DigiPosts installation directory, to the lib/ext subdirectory of your JVM. You must start the server manually from a command line the first time the ‘digiposts’ parameter is added. You can do this with the following command: java –cp Server.zip com.diginet.digichat.server.ChatServer You will then be asked a series of questions about your DigiPosts configuration. You will need to know the following information: Database Username: This is the username DigiPosts uses to connect to the database. Database Password: This is the password corresponding to the above username. Database URL: This is the JDBC URL for your DigiPosts database. You can find this in the ‘web.xml’ file in your DigiPosts installation. It will be something like this: jdbc:mysql://yourserver.com/digiposts Database Driver: This is the JDBC driver. This is also listed in your DigiPosts’ ‘web.xml’ file, and will likely be: org.mm.mysql.Driver After this is configured the first time, it will not ask you for the information again. Should you need to change any of that information you will need to delete the file ‘digiposts.digi’ in the Settings/Server subdirectory of your DigiChat installation directory. After this file is deleted, run the above command again, and it will ask you for the information again. DigiChat‰ v4.0 Product Documentation 18 ©2002 Digi-Net Technologies, Inc Launching and Running DigiChat ChatMaster Overview The DigiChat ChatMaster is used to remotely administer, manage and monitor individual chat sites. In addition to the functionality contained in the end-user chat applet, the ChatMaster allows you to create rooms, manage ChatWatch words and administer banners and icons and more. The ChatMaster also provides administrative capabilities such as "kicking" (expelling) users and sending chat broadcast messages. You can run the ChatMaster application from any machine with a live TCP/IP connection. It is not necessary to run it from the same machine that hosts the DigiChat Server. There is also an applet version of ChatMaster, which allows almost all of the functionality of the ChatMaster application with the convenience of an applet, which allows you to run the ChatMaster within the context of a Java-enabled browser. Launching the ChatMaster Use the instructions in the following table to launch ChatMaster, based on your platform/operating system. Platform Mac OS 9 Mac OS X 10.x Windows 95/98/NT/2000/XP UNIX Other Platforms Instructions Double-click the DigiChat ChatMaster application icon in your installation directory. Select DigiChat ChatMaster from the DigiChat Programs group of your Start menu. Change directory (cd) to your installation directory, then enter ‘./DigiChat_ChatMaster’ at the command prompt. If the above command does not work or if you are not using UNIX, you must manually invoke your Java Virtual Machine. Please refer to your Java Virtual Machine's documentation for information on launching a Java application. Set the classpath to ChatMaster.zip and enter the main class name, which is com.diginet.digichat.client.chatmaster.ChatMaster. The command typically resembles one of the following: java -cp ChatMaster.zip com.diginet.digichat.client.chatmaster.ChatMaster jre -cp ChatMaster.zip com.diginet.digichat.client.chatmaster.ChatMaster Some virtual machines may require you to append ".class" to the commands given above. DigiChat‰ v4.0 Product Documentation 19 ©2002 Digi-Net Technologies, Inc Logging into DigiChat Server ChatMaster allows for three separate types of logins: Admin Login: Use this login to perform server-level administrative tasks such as creating and maintaining sites. Chat hosting accounts will not have access to this feature. ChatMaster Login: Use this login to perform site-level tasks such as banning users, adding rooms, sending chat broadcast messages and more. Other Login: Use this login for guest access and some chat monitors. When an account is created with ChatMaster, you will use this feature to type in the Account “nickname”. NOTE: You cannot change the ChatMaster nickname. If you log in as ChatMaster and change the nickname in the Accounts tab, the ChatMaster account will become useless. You will have two options at this time. Delete and reinstall or log in as “Other”, type ChatMaster as the nickname and type in the old password. DigiChat‰ v4.0 Product Documentation 20 ©2002 Digi-Net Technologies, Inc DigiChat Configuration Using ChatMaster Server Configuration Overview The Admin Login into ChatMaster is used to administer your Server remotely. It is used to set up TM new chat sites, add and modify ChatWatch words and enter serial numbers and license keys. Logging in Use the following steps to log in as Admin for the Server. 1. Launch DigiChat ChatMaster. 2. Enter information in the text boxes displayed in the DigiChat Login dialog box. Text Box Connect as Name Description Select Admin from the drop-down list. Admin is auto-populated. Password For the Demo version or logging into your DigiChat server for the first time, the Admin password will be “DigiChat”. Host Enter the IP address to connect to your Server. If you have the software installed locally, you can use 127.0.0.1. Site ID 0 (zero) is auto-populated. After the initial login, you will be able to choose DigiChat>Change Password. Enter the required information in this dialog box to continue. Make sure you record your new password in a secure place. DigiChat‰ v4.0 Product Documentation 21 ©2002 Digi-Net Technologies, Inc DigiChat Admin Window When using ChatMaster to log in as Admin and administer server options, this DigiChat Admin window will be displayed. The sample images below provide an overview of the tasks available from this window. The Status tab provides you with important data about the Server. The Sites tab provides you with a quick glance at the sites currently set up on the Server. Click DigiChat from the menu bar for configuration options. DigiChat‰ v4.0 Product Documentation 22 ©2002 Digi-Net Technologies, Inc The following table provides a brief description of the tasks available from this window. Menu Item Description TM Set Server Options Select to administer sites, ChatWatch , and Serial Numbers / License Keys Send Chat Broadcast Select to send a broadcast message to all sites on the server or to a specific site. Change Password Select to change the password for the Admin login. (This is ‘DigiChat’ by default.) Change Commander Password New Login Window Disconnect Quit Select to change the password for the Commander login. ‘DigiChat’ by default.) (This is Select to display a new DigiChat Login dialog box. This will enable you to login as another user (such as ChatMaster) while remaining logged in as Admin. Select to disconnect Admin from the Server. Select to exit ChatMaster. DigiChat‰ v4.0 Product Documentation 23 ©2002 Digi-Net Technologies, Inc Set Server Options Managing Sites Use the following steps to add/edit sites on the Server. 1. Select DigiChat > Set Server Options from the main menu. The Server Options dialog box will be displayed. 2. Select the Sites tab. 3. Click “Add” to create an additional site, or select a site from the list and click Edit. The Add Site or Edit Site dialog box displays. DigiChat‰ v4.0 Product Documentation 24 ©2002 Digi-Net Technologies, Inc 4. Add or modify information in this dialog box: Enter the name of the site in the “Name” text box. The Site ID will automatically display the next numerical Site ID, but you can change this to any number you wish as long as it is not already in use. Select the Moderated Option check box to enable the auditorium style moderated chat event capabilities in DigiChat (see the section entiled Conduction a Moderated Chat on page 68). Enter the number of users or leave the default zero (0) for an unlimited number (subject to a server license user limit). If you would like all accounts in this site to be recognized by a DigiPosts site and vice versa, select the ‘Allow DigiPost Sync’ check box. 5. Click OK. 6. Click Cancel when your are done. 7. Choose Save if you are finished using the “Set Server Options”. To “Delete” a site, select the existing site from the Sites tab and click Delete. To “Restart” a site, select the existing site from the Sites tab and click Restart. It is sometimes necessary to restart a chat site; for example, when a file becomes corrupted and restarting is the only way to fix the problem. Please note that this will close all active connections to that site, close all logs and setting files, and reload all files associated with that site. Managing ChatWatch™ Server Level ChatWatch enables you to replace profane or undesirable words with words or asterisks (*) of your choice. You can establish this word replacement for all sites or allow the ChatMaster to implement ChatWatch at the site level. ChatWatch compares whole words only. For example, if you include the word "damn" in your ChatWatch list, any instance of the word "damn" will be replaced, however "damning" or "damnit" will not be replaced. If you wish for these words to be censored, you must add each to the ChatWatch list. ChatWatch is not case sensitive; both "damn" and "Damn" would be replaced using the previous example. DigiChat‰ v4.0 Product Documentation 25 ©2002 Digi-Net Technologies, Inc A ChatWatch list is maintained for the Server, as well as for each chat site. You will see that the banned word is on the left side of the list, while the replacement is on the right. Words added to the Server ChatWatch list automatically appear in the list for each chat site. Therefore, you may set up a base list of words to censor, and ChatMasters may add additional words to their own sites. Use the following steps to add/edit words from the ChatWatch list. 1. Select DigiChat > Set Server Options from the main menu. The Server Options dialog box displays. 2. Click the ChatWatch tab. 3. Click Add to include an additional word, or select a word from the list and click Edit. The Add ChatWatch or Edit ChatWatch dialog box displays. DigiChat‰ v4.0 Product Documentation 26 ©2002 Digi-Net Technologies, Inc 4. Enter the word that you wish to replace, followed by the word it should be replaced with (leave the “With” text box blank to use asterisks as the replacement). If editing, make the appropriate changes to the existing information. 5. Click OK. 6. Click Save. To delete a ChatWatch word, select it from the list in the ChatWatch tab and click Remove. You can Import or Export words from a text file for inclusion on your ChatWatch list. Use the following steps to Import or Export ChatWatch words: • Click the ChatWatch tab. • Click the Import/Export button, depending on the function you want to use. • A window will appear showing all available text files on your hard drive. Specify the file that you want to use and click open. When exporting you can name the file what you want and save it to your hard drive. The format of the ChatWatch text file must be as follows: Test ; test1 Damn ; darn Camp ; summer From the ChatWatch mode drop-down list, you can choose to have the ChatWatch list “On for All Sites” or for “ChatMaster Decides”. When choosing “On for All Sites”, this will automatically turn on the ChatWatch for every site. If you choose “ChatMaster Decides”, then it will be off until a ChatMaster logs into that site and turns it on. DigiChat‰ v4.0 Product Documentation 27 ©2002 Digi-Net Technologies, Inc Managing Keys License keys set the total number of DigiChat sites you can host on one Server, or they may enhance the functionality of existing sites though incremental DigiChat features such as Moderated Chat. Some keys may have certain prerequisites, such as Moderated Chat, that require a purchase or upgrade to the Enterprise edition of DigiChat. Each copy of DigiChat must have at least one valid key in order to run past the 15-day demo period. There will be a total of two keys listed in your “Keys” tab. Keys may be purchased from http://www.digichat.com. Use the following steps to add/edit keys. 1. Select DigiChat > Set Server Options from the main menu. The Server Options dialog box displays. 2. Click the Keys tab. 3. Click Add to create an additional key. The Add Key dialog box displays. DigiChat‰ v4.0 Product Documentation 28 ©2002 Digi-Net Technologies, Inc 4. Enter the Order # and Key number associated with your registration or modify the information present in the text boxes. You can use the copy and paste commands from the e-mail containing your keys to ensure the correct entry of those keys. 5. Click OK. 6. Click Cancel. 7. Choose Save if you are finished using the “Set Server Options.” To “Delete” a key, select it from the list in the Keys tab and click Remove. Change Commander Password If you are going to be using the DigiChat Commander, you will want to change the password. This password is required to access the server using the Commander. By default this password is set to ‘DigiChat’. For security purposes we would advise changing this password. To change it: Select DigiChat > Change Commander Password. You will be asked for the old password (enter ‘DigiChat’), and you will also be asked to provide the new password twice. DigiChat‰ v4.0 Product Documentation 29 ©2002 Digi-Net Technologies, Inc Sending Broadcast Messages The Chat Broadcast feature allows you to send a message to all users on a particular chat site or to all users on all sites. You can use this feature to immediately notify users of important information. Use the following steps to send a Chat Broadcast message. 1. Select DigiChat > Send Chat Broadcast from the main menu. 2. Select who will receive the message in the “Send to:” drop-down list. (Select an individual site or all sites.) 3. Enter your message in the large text box. Click Send to send your message to the site(s) indicated and close the Chat Broadcast “dialog box”. Click Cancel to close the Chat Broadcast dialog box without sending. DigiChat‰ v4.0 Product Documentation 30 ©2002 Digi-Net Technologies, Inc Site Configuration DigiChat ChatMaster Window Overview The DigiChat ChatMaster is used to remotely administer, manage, and monitor individual chat sites. In addition to the functionality contained in the Client Applet, the ChatMaster allows you to create rooms, ChatWatch words, banners and icons. The ChatMaster also provides administrative capabilities such as "kicking" (expelling) users and sending chat broadcasts. You may run the ChatMaster application from any machine with a TCP/IP connection. It is not necessary to run it from the same machine that hosts the DigiChat Server. Logging in Use the following steps to log in as ChatMaster for a site. 1. Launch DigiChat ChatMaster Application, or go to the ChatMaster Applet (http://yourserver.com/DigiChat/ChatMaster.html). 2. Enter information in the text boxes displayed in the DigiChat Login dialog box. Text Box Connect as Name Password Host Site ID Invisible Description Select ChatMaster from the drop-down list. ChatMaster will auto-populate. The default password for Site ID 1000 is ‘Default’. (Password is case-sensitive) For chat hosting accounts, the password will be the password you set up when creating your account with Digi-Net Technologies, Inc. Enter the IP address to connect to your Server. Enter the number for the site you are logging into. Use this to hide your screen name from other users in the chat room. This is ideal for ChatMasters that wish to monitor the room without being seen. DigiChat‰ v4.0 Product Documentation 31 ©2002 Digi-Net Technologies, Inc The DigiChat ChatMaster Window This window appears just as the Applet does, with discussion in the left pane and two tabs available on the right pane: Users and Rooms. The ChatMaster has all functions of a normal user, available by clicking buttons to check user profiles, change icons, settings, logout, etc. The ChatMaster can also send messages at will and participate in discussion. DigiChat‰ v4.0 Product Documentation 32 ©2002 Digi-Net Technologies, Inc The primary difference between the regular DigiChat Client Applet and the DigiChat ChatMaster interface is the contents of the DigiChat pull-down menu at the top of the window. The following table provides a brief description of the tasks available from this window. Menu Item Description Set Site Options Select to administer sites, including adding and editing rooms, managing ChatWatch, banners, icons, themes, accounts and more. Send Chat Broadcast Select to send a broadcast message to all users in all rooms or all users in a particular room. Change Password Select to change the password for the ChatMaster login. New Login Window Select to display a new DigiChat Login dialog box. This will enable you to login as another user (such as Admin) while remaining logged in as ChatMaster. Disconnect Select to disconnect ChatMaster from the Server. DigiChat‰ v4.0 Product Documentation 33 ©2002 Digi-Net Technologies, Inc Set Site Options Setting General Options Under the Options tab you can control several different General site options. Use the following steps to set site-level options. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. 2. Click the Options tab. 3. Enter the URL for the logo link. This is the URL that the user is transported to when clicking on the logo in the upper-left part of the chat frame. 4. If you wish to use Buddy Lists with your site, you must let the server know where the CGI script is located. Enter the URL to that site here. (see page 65 for more information on configuring the Buddy List Functionality) 5. Enter the number of minutes before a user is timed out of the site for inactivity. Enter zero (0) to disable this option. 6. Enter the number of seconds to pause before rotating banner ads. DigiChat‰ v4.0 Product Documentation 34 ©2002 Digi-Net Technologies, Inc 7. Enter the maximum number of bots you wish to allow on your site. 8. Enter the number of sequential identical messages allowed by an individual user before they are automatically kicked out of the chat. Leave this value set to ‘0’ if you wish to disable this feature. 9. Enter the number of messages per number of seconds you would like to allow from an individual user. This is another measure to prevent flooding and spamming of the chat room. 10. If you wish the flooding users to be banned in addition to being kicked, check the ‘Ban IP’ or ‘Ban Host’ check boxes. 11. Select the Keep Chat Transcript check box to record a transcript of all chat discussions for the site. Transcripts are stored in the Resources directory for the site that you are working on in HTML format. (Private conversations are not transcribed.) 12. If you would like to use emoticons on your site, you need to check the “use emoticons” box. Click Save if you are done making changes to the “Set Site Options” DigiChat‰ v4.0 Product Documentation 35 ©2002 Digi-Net Technologies, Inc Managing ChatWatch (ChatMaster SITE Level) ChatWatch enables you to replace profane or undesirable words with words or asterisks (*) of your own choice. You can establish this word replacement for select rooms or the entire site. ChatWatch compares whole words only. For example, if you include the word "damn" in your ChatWatch list, any instance of the word "damn" will be replaced, however "damning" or "damnit" will not be replaced. If you wish for these words to be censored, you must add each to the ChatWatch list. ChatWatch is not case sensitive; both "damn" and "Damn" would be replaced using the previous example. A ChatWatch list is maintained for the Server, as well as for each chat site. You will see that the banned word is on the left side of the list, while the replacement is on the right. Words added to the Server ChatWatch list automatically appear in the list for each chat site. Therefore, you will have use of the base list of words to censor, and be able to add additional words to your site(s). Use the following steps to add/edit words from the ChatWatch list. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. 2. Click the ChatWatch tab. 3. Click Add to include an additional word, or select a word from the list and click Edit. The Add ChatWatch or Edit ChatWatch dialog box displays. DigiChat‰ v4.0 Product Documentation 36 ©2002 Digi-Net Technologies, Inc 4. Enter the word that you wish to replace, followed by the word it should be replaced with (leave the With text box blank to use asterisks as the replacement). If editing, make the appropriate changes to the existing information. 5. Click OK. 6. Click Cancel. To delete a ChatWatch word, select it from the list in the ChatWatch tab and click Remove. You can Import or Export words from a text file. Use the following steps to Import or Export ChatWatch words: 1. Click the ChatWatch tab. 2. Click the Import/Export button, depending on the function you want to use. 3. A window will appear showing all available text files on your hard drive. Specify the file that you want to use and click open. When exporting you can name the file what you want and save it to your hard drive. The format of the ChatWatch text file must be as follows: Test ; test1 Damn ; darn Camp ; summer Select the ChatWatch Mode drop-down list to indicate whether the list is always on. DigiChat‰ v4.0 Product Documentation 37 ©2002 Digi-Net Technologies, Inc Managing Emoticons Emoticons allow your users to substitute strings of typed characters with graphical symbols. For example, the popular “smiley face” commonly typed as a :-) would be replaced by the graphic J, when the same string is typed. This graphic comes prepackaged with the software. You may use any graphic in GIF or JPG format for your emoticons; however, they cannot exceed 16 X 16 pixels in size. Any graphic larger than this will be cut off by the lines of the text in the chat window. Once you have created these graphics and stored them into the emoticons directory on the DigiChat Server (<webroot>/DigiChat/DigiClasses/Resources/<site_name>/Emoticons), you can add them to the Emoticons tab by following the directions below: 1. From the “Set Site Options” menu, choose the Emoticons tab. 2. Choose Add. A dialog box will appear asking for a word and the file to replace that word. DigiChat‰ v4.0 Product Documentation 38 ©2002 Digi-Net Technologies, Inc 3. In the word field, type in the string of characters that will be replaced by a graphic. 4. In the “With Icon” field, place the name of the file that you have loaded into the emoticons folder under the DigiChat folder in your web root. For hosted accounts, you will need to upload these graphics to your FTP account. 5. Choose OK. 6. Choose cancel once you have added all your graphics. DigiChat‰ v4.0 Product Documentation 39 ©2002 Digi-Net Technologies, Inc Managing Rooms Use this feature to add, edit, or remove rooms. You can password protect individual rooms. If you place a password on the default room, however, this will require any users trying to log into your site to enter a password. You can also optionally set a maximum number of users allowed in a room. If a user attempts to enter a room that has reached its limit, a new room will be automatically spawned, and the user is placed in that new room. For example, assume "DigiChat Foyer" has been set to allow a maximum of 25 users. When the 26th user enters, "DigiChat Foyer (2)" is created. If "DigiChat Foyer (2)" also fills up, "DigiChat Foyer (3)" will be spawned. Spawned rooms are temporary, and will be automatically deleted after a period of inactivity (approximately one hour). However, if a ChatMaster edits a spawned room (by changing its name or topic, for instance), the room will be made permanent so that the changes are preserved. Use the following steps to add/edit rooms: 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. 2. Click the Rooms tab. DigiChat‰ v4.0 Product Documentation 40 ©2002 Digi-Net Technologies, Inc 3. Click Add to create a new room, or select a room from the list and click Edit. The Add Room or Edit Room dialog box displays. 4. Enter information into the displayed text boxes according to the following table. Text Box Description Name Enter the name of the room. Topic Enter the topic for the room. The topic will be displayed to the users. Password (Optional) Enter a password to protect the room for only users with the designated password. Confirm Password Re-enter the password to confirm if entered above. Maximum Users Select the maximum number of users from the drop-down list or select “No Maximum” for an unlimited number of users. Moderated Select this check box to make this a moderated room. (See pg. 67 for full details on moderated chat.) Suppress Enter/Edit Messages Select this check box to prevent messages that announce the entry/exit of each user in a chat room from displaying when users enter and exit the room. 5. Click OK 6. Click Cancel. To delete a room, select it from the list in the Rooms tab and click Remove. DigiChat‰ v4.0 Product Documentation 41 ©2002 Digi-Net Technologies, Inc Managing Banners DigiChat displays scrolling banners at the top of the main window of both the Client Applet and the ChatMaster. Each banner may link to a different URL, allowing you to provide links for advertising, information or entertainment purposes. DigiChat includes a default set of banners. You may replace these banners and add your own to customize the appearance of your site. When creating banners, please use the following guidelines: • Banners must be in JPEG or GIF89a format. • Transparency will interfere with the banner scrolling. Turn transparency off for GIF images. • All banners should have the same dimensions. • Keep the WIDTH of your banners between 200 and 468 pixels. • All banners should match that of your chat logo, and should generally be between 50 and 75 pixels HIGH. • Enter file names exactly as they are saved on the Server, including case. When you add a banner with the ChatMaster application, you must place the image file in your site's banners directory (<webroot>/DigiChat/DigiClasses/Resources/<site_name>/banners) before users can view the banner. When doing so, make sure to record the name of the file you are copying. It must exactly match (including case) the name entered in ChatMaster when adding the banner. When removing a banner, you should also remove its image file from this directory. Removing a banner with the ChatMaster does not automatically remove its image file. Use the following steps to add/edit banners. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. DigiChat‰ v4.0 Product Documentation 42 ©2002 Digi-Net Technologies, Inc 2. Click the Banners tab. 3. Click Add to select a banner, or select one from the list and click Edit. The Add Banner or Edit Banner dialog box displays. 4. Enter information into the displayed text boxes according to the following table. DigiChat‰ v4.0 Product Documentation 43 ©2002 Digi-Net Technologies, Inc Text Box Site Name Web Address File Name Description Enter the name of the site that the banner is advertising. Enter the URL for the company being advertised. Enter the name of the GIF or JPG file that displays the banner. 5. Click OK 6. Click Save To delete a banner, select it from the list in the Banners tab and click Remove. To change the order of your banners, select a banner from the list and choose the up or down buttons at the bottom of the list. Managing Icons DigiChat includes a standard set of user icons. You may add your own icons to customize the appearance of your site. When creating icons, please use the following guidelines: • Icons must be in JPEG or GIF format. GIF89a is the preferred format. • Animated GIFs are not supported. • Use transparency in GIF files so they appear correctly against a variety of background colors. • Icons should be 24 x 24 pixels. • Avoid more than 40 user icons active at any one time. • Enter file names exactly as they are saved on the Server, including case. Before adding an icon with the ChatMaster application, place the image file in your site's ‘userIcons’ directory (<webroot>/DigiChat/DigiClasses/Resources/<site_name>/userIcons). When doing so, make sure you record the name of the file you are copying. It must match exactly (including case) the name you enter when adding the icon. When removing an icon, you may want to remove its image file from this directory. Removing an icon with the ChatMaster DOES NOT automatically remove its image file. You may also set certain icons to “restricted”. This only allows use of that icon by the ChatMaster and any other users given access through the “Accounts” tab (the “Access Reserved Icons” permission must be checked). To select an icon for restriction, find the icon under the Icons tab and check the “Restricted” column. DigiChat‰ v4.0 Product Documentation 44 ©2002 Digi-Net Technologies, Inc Use the following steps to add/edit icons: 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. 2. Click the Icons tab. 3. Click Add to select a new icon, or select one from the list and click Edit. The Add Icon or Edit Icon dialog box displays. 4. Enter the file name (exact including case) that is located in your ‘userIcons’ directory for the icon you want to use. When you click Edit, you are able to modify this file name. DigiChat‰ v4.0 Product Documentation 45 ©2002 Digi-Net Technologies, Inc 5. Click OK. 6. Click Save. To delete an icon, select it from the list in the Icons tab and click Remove. Using DigiCast™ DigiCast is DigiChat's system for periodically sending automated messages to users of your DigiChat site in the main chat message window. You may use DigiCast creatively for advertising or information purposes. You may include as many DigiCast messages as you like, and specify how frequently they appear. A DigiCast message will appear like any other message in the DigiChat window. You may specify a name (shown where the user’s name normally is), icon, and message for each DigiCast item. You may include URLs in the message simply by typing the URL into the message. When a URL appears in a message, DigiChat will automatically identify the URL, display it in blue, underline the text, and allow any user to click and follow the link, just like a web browser. DigiChat recognizes URLs in the following forms: • http://www.digichat.com • https://www.digichat.com • ftp://digichat.com • mailto:[email protected] • [email protected] Use the following steps to add/edit DigiCast messages. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. DigiChat‰ v4.0 Product Documentation 46 ©2002 Digi-Net Technologies, Inc 2. Click the DigiCast tab. 3. Click Add to create a new DigiCast, or select one from the list and click Edit. The Add DigiCast or Edit DigiCast dialog box displays. 4. Enter the name of the message. 5. Enter the message in the DigiCast text box. DigiChat‰ v4.0 Product Documentation 47 ©2002 Digi-Net Technologies, Inc 6. Select the icon to display next to the message by clicking on it (from the list of icons displayed icons at the bottom of the dialog box). Click the next and previous arrows to scroll through ALL available icons. 7. Click OK. 8. Select whether to display the DigiCast messages in sequential or in random order by clicking the appropriate radio button. 9. Enter the amount of seconds to wait before displaying the next message. 10. Click Save. To delete a DigiCast message, select it from the list and click Remove. Banning Users DigiChat allows you to ban users, based on an IP address or host name. You may use this feature to prevent problem users from connecting to your server. When banning a user, you may specify a full or partial IP address or host name. For example, if you entered "dialup1.somehost.com," only users connecting from dialup1.somehost.com would be banned from your DigiChat site. If you enter "somehost.com", all users whose host name contains "somehost.com", such as "dialup2.somehost.com" or "station.somehost.com", would be banned. Likewise, you may enter a full IP address, such as "123.45.67.100" to ban a single IP, or "123.45.67." to ban all IPs in the range from 123.45.67.0 to 123.45.67.255. NOTE: Be careful when entering partial IPs or host names. For example, entering ".com" as a host name, you would ban all hosts that contain ".com" in their name, effectively banning the majority of Internet users. Only users connecting through the DigiChat applet can be banned. Since a password is required for a ChatMaster or ChatMonitor to connect, they cannot be banned based on IP or host. This also prevents a ChatMaster from accidentally locking him or herself out. If an IP is inadvertently banned, the ChatMaster may always connect. Use the following steps to add/edit banned users. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. DigiChat‰ v4.0 Product Documentation 48 ©2002 Digi-Net Technologies, Inc 2. Click the Ban Users tab. 3. Click Add to ban a user, or select one from the list and click Edit to change information about the banned user. The Add IP/Host or Edit IP/Host dialog box displays. 4. Enter the IP address or host information for the user (using the guidelines discussed on the previous page). 5. Click OK. 6. Click Save. DigiChat‰ v4.0 Product Documentation 49 ©2002 Digi-Net Technologies, Inc To delete a banned user (allowing them access again to the site), select the user from the list and click Remove. Managing Hosts To ensure the integrity of the chat offered through your site, DigiChat incorporates some advanced features to prevent unauthorized access to your chat site from other web sites. These security features are particularly important for users who have integrated DigiChat with a membership system, since it prevents a user from entering the chat through an HTML page that bypasses the membership system. DigiChat's security features prevent such abuse by restricting access to your DigiChat site to only users connecting from Web pages from Web sites that you authorize. If a user attempts to connect to your DigiChat site from another Web site, or from a file saved to his or her local hard drive, he or she will be refused access to the site. These security features are not designed to, nor will they have any effect upon, IP addresses from which your chat visitors originate. It is designed specifically to block the chat from being served by any site other than the ones you specify. If you wish to ban a user based on their IP or host name, follow the instructions for Banning Users. Use the following steps to specify restricted access hosts. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. DigiChat‰ v4.0 Product Documentation 50 ©2002 Digi-Net Technologies, Inc 2. Click the Hosts tab. 3. Click Add to restrict access to a new IP/Host, or click Edit to change information about the restricted IP/Host. The Add IP/Host or Edit IP/Host dialog box displays. 4. Enter a full host name or IP address that will restrict access to the site to only the specified IP/Host. 5. Click OK. 6. Click Save. To delete a host, select it from the list displayed in the Hosts tab and click Remove. Managing Accounts A DigiChat ChatMaster may set up special accounts for users who are allowed to access some of the site-level controls of the ChatMaster, without having full control over the site. These users are known as ChatMonitors. Some ChatMonitors may function as Moderators or Guest Speakers within a moderated chat site. Both ChatMasters and ChatMonitors connect to the DigiChat Server with the ChatMaster application, and interact with the Server in an identical way. However, the two user classes vary in several ways. While a ChatMaster is given complete control over a DigiChat site, a ChatMonitor's access can be limited to certain areas. For example, the ChatMaster may allow the ChatMonitor to kick users, but not allow he or she to edit rooms or icons. Only a ChatMaster may designate ChatMonitors and change the site password. In addition, ChatMonitors must log onto the DigiChat Server using the name and password assigned to them by the ChatMaster. Use the following steps to set the security and access for special accounts. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. DigiChat‰ v4.0 Product Documentation 51 ©2002 Digi-Net Technologies, Inc 2. Click the Accounts tab. 3. Click Add to create a new account, or click Edit to change information about the account. The Add Account or Edit Account dialog box displays. DigiChat‰ v4.0 Product Documentation 52 ©2002 Digi-Net Technologies, Inc 4. Enter a name for the account, such as Chat Monitor, Moderator, or whatever you wish to name your account. 5. Enter a password for the account and confirm the password in the next text box. 6. Select the options that the account holder will have rights to. For example, to set rights for the account to kick users, click to the left of that option to place a check mark beside it. To remove an option, click the check mark to remove it. 7. Click OK. 8. Click Save. To delete an account, select it from the list displayed in the Accounts tab and click Remove. Do not change the name of the ChatMaster account. If you change the nickname of the ChatMaster, you will render logging in through ChatMaster as unusable. You will then need to log in as “Other” and type in ChatMaster as the nickname. If you do not want users to create their own rooms, then you need to remove the following permissions from the guest account: Create Permanent Private Rooms Create Temporary Private Rooms Create Permanent Public Rooms Create Temporary Public Rooms DigiChat‰ v4.0 Product Documentation 53 ©2002 Digi-Net Technologies, Inc Managing Themes ChatMaster allows you to customize the look of the DigiChat Applet using pre-defined and customized themes. These themes allow you to select colors, fonts, font styles and sizes, and more. This creates a completely customized look for your DigiChat application. Use the following steps to customize the Applet using themes. 1. Select DigiChat > Set Site Options from the main menu. The Site Options dialog box displays. 2. Click the Themes tab. 3. Click Add to create a theme, or select a theme from the list and click Edit to change the theme configuration. The Add Theme or Edit Theme dialog box displays. DigiChat‰ v4.0 Product Documentation 54 ©2002 Digi-Net Technologies, Inc 4. Enter a name for the theme, as well as a directory name for this theme to be saved in. (It will be saved inside the ‘Themes’ directory in your Resources directory.) 5. Change information for each area listed by selecting an option from the drop-down menu, or by entering the HEX value for your custom colors. 6. Click OK. 7. Click Save. To delete a theme, select it from the list and click Remove. DigiChat‰ v4.0 Product Documentation 55 ©2002 Digi-Net Technologies, Inc DigiChat v4.0 gives you a great deal of control over the look and feel of the entire chat interface. This is namely because you can now replace key interface elements with your own custom images. All buttons and tabs in the main interface can be loaded from a collection of images. This gives you an infinite possibility of different interface designs. Included with your DigiChat v4.0 site are three sample themes for you to use. You can also use these as a starting point for creating your own themes. The themes you create within DigiChat are saved into the ‘Themes’ directory in your Resources directory. The themes are written into a directory named for the theme you create. A zip file is also created containing the contents of your theme. You can then copy that zip file to other sites or even other DigiChat servers to share and duplicate your theme. NOTE: If you update a Theme and would like the .zip file to be updated as well, delete the existing .zip file and save your current theme settings in ‘Set Site Options’. This will force DigiChat to create a new .zip file with all of the settings and images updated from the directory of the theme you modified. DigiChat‰ v4.0 Product Documentation 56 ©2002 Digi-Net Technologies, Inc In order to create your own custom themes using your own custom images you must follow the naming convention for your images that DigiChat will be expecting. These images reside in the individual directories named for the theme located in the ‘Themes’ directory of your Resources directory. In the table below you will find all of the image names, with each images function inside DigiChat. Image Name addbuddy_button_disabled.gif addbuddy_button_dn.gif addbuddy_buttop_up.gif allusers_checked..gif allusers_unchecked.gif background.gif buddies_tab_down.gif buddies_tab_up.gif chatLogo.gif file_3_button_dn.gif file_3_button_up.gif flag_button_disabled.gif flag_button_dn.gif flag_button_up.gif helpLogo.gif kick_button_disabled.gif kick_button_dn.gif kick_button_up.gif logout_button_dn.gif logout_button_up.gif mute_button_disabled.gif mute_button_dn.gif mute_button_up.gif private_button_disabled.gif private_button_dn.gif private_button_up.gif profile_button_disabled.gif profile_button_dn.gif profile_button_up.gif profile_request_2_button_dn.gif profile_request_2_button_up.gif profile_request_3_button_dn.gif profile_request_3_button_up.gif removebuddy_button_disabled.gif DigiChat‰ v4.0 Product Documentation Description of Function Add Buddy button at top of user’s tab – Disabled version Add Buddy button at top of user’s tab – Depressed version Add Buddy button at top of user’s tab – Normal version Check box for “show all users” - Checked Check box for “show all users” - Unchecked Background Image Buddies Tab – Unselected Version Buddies Tab – Selected Version Log image to the left of banner File transfer button in private message window – Depressed version File transfer button in private message window – Normal version Flag User button at top of user’s tab – Disabled version Flag User button at top of user’s tab – Depressed version Flag User button at top of user’s tab – Normal version Logo displayed in help area at bottom of chat interface Kick User button at top of user’s tab – Disabled version Kick User button at top of user’s tab – Depressed version Kick User button at top of user’s tab – Normal version Logout button of main chat interface – Depressed version Logout button of main chat interface – Normal version Ignore User button at top of user’s tab – Disabled version Ignore User button at top of user’s tab – Depressed version Ignore User button at top of user’s tab – Normal version Private Message button at top of user’s tab – Disabled version Private Message button at top of user’s tab – Depressed version Private Message button at top of user’s tab – Normal version Profile button at top of user’s tab – Disabled version Profile button at top of user’s tab – Depressed version Profile button at top of user’s tab – Normal version Profile button in private message window – Depressed version Profile button in private message window – Normal version Profile button in private message window – Depressed version – When file transfer button is present Profile button in private message window – Normal version – When file transfer button is present Remove buddy button in Buddies tab – Disabled version 57 ©2002 Digi-Net Technologies, Inc removebuddy_button_dn.gif removebuddy_button_up.gif rooms_tab_down.gif rooms_tab_up.gif send_button_dn.gif send_button_up.gif send_small_2_button_dn.gif send_small_2_button_up.gif send_small_3_button_dn.gif send_small_3_button_up.gif settings_button_dn.gif settings_button_up.gif users_tab_down.gif users_tab_up.gif DigiChat‰ v4.0 Product Documentation Remove buddy button in Buddies tab – Depressed version Remove buddy button in Buddies tab – Normal version Rooms Tab – Unselected Version Rooms Tab – Selected Version Send button of main chat interface – Depressed version Send button of main chat interface – Normal version Send button in private message window – Depressed version Send button in private message window – Normal version Send button in private message window – Depressed version – When file transfer button is present Send button in private message window – Normal version – When file transfer button is present Settings button of main chat interface – Depressed version Settings button of main chat interface – Normal version Users Tab – Unselected Version Users Tab – Selected Version 58 ©2002 Digi-Net Technologies, Inc DigiChat Applet Configuration To allow users to chat, you will need to include the DigiChat Client Applet on a Web page. A folder named “HTML_Templates” is included with your DigiChat distribution to help you set up this web page. There are 3 applets included with DigiChat: the regular applet, the Lite applet and the ChatMaster applet. Each has a corresponding sample HTML file. Both the regular applet and the ChatMaster applet have a separate version of the template for a signed Java applet, which enables the file transfer features. The actual applet parameters for both the regular applet and ChatMaster applet (signed & unsigned) are defined in external JavaScript files also included in the templates directory. These files are as follows: chat.js, chatSigned.js, chatmaster.js, and chatmasterSigned.js. In order to change the applet configuration for one of these applets, you must edit one of the corresponding .js files. To change the applet configuration for the Lite Applet, you will edit the DCLite.html file directly, no external .js file is referenced for this version of the applet. Below you will see a default copy of the chat.js file: document.writeln("<APPLET NAME='DigiChat’ "); document.writeln("CODEBASE='http://yourserver.com/DigiChat/DigiClasses/' "); document.writeln("CODE='com.diginet.digichat.client.DigiChatApplet' "); document.writeln("HEIGHT=100 WIDTH=200 ALIGN='MIDDLE' "); document.writeln("ARCHIVE=Client.jar MAYSCRIPT>"); document.write(" <PARAM NAME=cabbase value=Client.cab>"); document.write(" document.write(" document.write(" document.write(" document.write(" <PARAM NAME=siteID VALUE=1000>"); <PARAM NAME=background VALUE=FFFFFF>"); <PARAM NAME=textcolor VALUE=000000>"); DigiChat requires a Java Compatible web browser to run. "); </APPLET>"); Any configuration changes made to the DigiChat applet are made in this file. The DigiChat Applet accepts information in the form of applet parameters. You will see that the default applet already contains a few applet parameters (siteID, background, etc.). All parameters added to this file should be in the same format. This format is as follows: document.write(" <PARAM NAME=ParameterName VALUE=ParameterValue>"); The following section outlines exactly what parameters the DigiChat Applet recognizes, and the appropriate values for each one. DigiChat‰ v4.0 Product Documentation 59 ©2002 Digi-Net Technologies, Inc DigiChat Applet Parameters Applet Parameter Table Parameter Definition Required Params: CODEBASE Tells the Web browser where to find the DigiChat Client applet. You must replace "www.yourserver.com” with name of your server. Do not remove “/DigiChat/DigiClasses” and do not modify the CODE parameter. siteID The site number this particular DigiChat site occupies on the DigiChat Server. Enter the site number assigned when the site was created, or the number provided to you by your DigiChat Administrator. The default value is 1000. cabbase Used by Microsoft Internet Explorer to load the applet. Do not change this value. User Profile Params: nickname The user’s nickname. This is the name that will appear in the Users list, and each time the user sends a message. When integrating DigiChat with a membership system, this should be the member’s name. If this parameter is included, the user will automatically be logged into DigiChat once the applet has loaded; it will not be necessary for him or her to click the “Login” button. email The user’s e-mail address. This information is displayed in the user’s profile. realname The user’s real name. This information is displayed in the user’s profile. gender The user's gender. This information is displayed in the user’s profile. Valid values are “male” or “female”. age The user’s age. url The user’s Web page or URL. This information is displayed in the user’s profile. In addition, if “openProfileURL” is true, then clicking on the “Get Profile” button will automatically open this URL. exitmessage The message displayed when the user leaves DigiChat or switches to another room. comments The user’s real comments. This information is displayed in the user’s profile. iconID The user’s icon specified by the ID number of the icon as shown in the ChatMaster’s icon list. blockProfile Set VALUE=“true” to prevent other users from viewing this user’s profile information. ChatMasters will always be able to view this information. DigiChat‰ v4.0 Product Documentation 60 ©2002 Digi-Net Technologies, Inc Parameter Definition Applet Config Params: roomID The ID of the room a user will enter after logging in. If this PARAM and room are missing, or a room with this ID does not exist, the user will be placed in the default room specified by the ChatMaster. In addition, if the default room is password protected, but the room specified by this PARAM is not, the user will be placed in the default room to prevent bypassing the password security. By using this option, you can have different HTML pages access different rooms of the same chat site. You should not use both roomID and room. room The exact name (case-sensitive) of the room a user will enter after logging in. If this PARAM and roomID are missing, or a room with this name does not exist, the user will be placed in the default room specified by the ChatMaster. In addition, if the default room is password protected, but the room specified by this PARAM is not, the user will be placed in the default room to prevent bypassing the password security. By using this option, you can have different HTML pages access different rooms of the same chat site. You should not use both roomID and room. browserClose Use this parameter for non-embedded chat if you would like the chat to close if the user goes to another page on their web browser. Set the value to “true” if that is your desired setting. If this parameter is not manually set, it will revert to the default value of “false” and the chat will always attempt to stay open under such conditions. openProfileURL Set VALUE=“true” so clicking on the “Get Profile” button automatically opens the user’s specified URL. This will bypass the normal Profle system within DigiChat. language The name of language file to use. See the “DigiChat/languages” directory for the languages currently installed for DigiChat. Each language has a .lang and .langz file. Specify the name of a .lang file for value of this parameter, e.g., “spanish.lang.” Sometimes there may be problems with multi-language sites adjusting from another language back into English. To resolve this issue, specify english.lang in the English version of your chat site. background The background color for the “login box,” e.g., “FFFFFF” yields a white background. Do not include a pound sign (#), as in HTML. You may use this parameter to match the applet to your HTML page. If this PARAM is missing, the background defaults to white. This does not affect the background color of the main chat window. textcolor The color for the text in the “login box,” e.g., “FF0000” yields red text. Do not include a pound sign (#), as in HTML. If this PARAM is missing, the text color defaults to black. This does not affect the text color of the main chat window. themeID The user's theme specified by the ID number of the theme as shown in the Chatmaster’s theme list. WindowHeight The initial window height in pixels for a non-embedded chat window. WindowWidth The initial window width in pixels for a non-embedded chat window. UsersTab Set VALUE=“false” to hide Users Tab in the main chat window. RoomsTab Set VALUE=“false” to hide Rooms Tab in the main chat window. embedded Set VALUE=“true” to embed the chat window in the HTML page containing the applet. If you do this, change the HEIGHT and WIDTH parameters to appropriate sizes. DigiChat‰ v4.0 Product Documentation 61 ©2002 Digi-Net Technologies, Inc Parameter Definition preferredPort Set VALUE= to the port number you want the applet to try first when connecting to the DigiChat Server. The value must be one of the following ports: 8396, 58396, 110, 25, 119, or 443. Set this value to ‘80’ if you wish to enable HTTP Tunneling by default. BuddiesTab Enables your buddy lists feature. VALUE=”true” Applet Config Params: floodControl The delay (in milliseconds) allowed between messages sent into the chat screen by one user. There is a default parameter on the HTML code with a VALUE=”250”, you can change this number to meet your needs. autoPopup This parameter allows for the private message, sent by one user to another, to pop up in a separate window instead of being a highlighted message in the main chat window. This parameter has a default value of “true”. To disable this feature, change it to “false”. MenuItemX Creation of a pull-down menu; this parameter creates the “label” or name of the menu. The Value is the name of the menu item. The X in this parameter is a whole number starting at 1, being incremented by one for each additional menu required. The MenuLocationX parameter is needed in conjunction with this one in order to work correctly. MenuLocationX This parameter specifies the URL that the user goes to when clicking on this item. The value is the URL. The MenuItemX parameter is needed with this parameter to work correctly. The X in this parameter is a whole number starting at 1, being incremented by one for each additional menu location required. helpURL This is to allow the help logo, located in the bottom left of the chat interface, to be linked to a particular Web site. The value would be the URL that you wish the link to be. For instance VALUE=http://www.digichat.com. buddyList The initial list of each user’s buddies; this is used with an integrated membership database. VALUE=”name1,name2,name3…” ports Specifies the ports that the applet will attempt to connect to the server on. See Optional Server Parameters for more information. font1 font1b The values are in the format: font-style-pointsize (dialog-bold-12). The font can be serif, sanserif, monospaced, dialog or dialoginput. The style can be bold, italic or bolditalic. If you leave out the style (dialog-12), it assumes normal style. If you leave out point size (dialog-bold), it assumes 12. If you leave out both (dialog), it makes both assumptions. font2 font2b DigiChat‰ v4.0 Product Documentation 62 ©2002 Digi-Net Technologies, Inc File Transfer Functionality New to DigiChat v4.0 is the ability for chat users to directly send files to each other. Due to security restrictions in Java this can only be accomplished through the use of a signed Java applet. This is a normal Java applet that has been ‘signed’ using an encrypted digital security certificate, similar to that of an SSL or secure web server. This digital certificate ensures that the applet you are downloading in your browser originated from ‘Digi-Net Technologies, Inc.’ and no one else. By signing the Java applet, it allows the applet to save a file to your local file system, as well as install itself into the browser, so that a download is not required each time a user returns to your site. This saves loading time for the user, and conserves bandwidth on the server side. The signed applets are contained in the template files ‘ChatSigned.html’ and ‘ChatMasterSigned.html’. When entering the chat through one of these applets you will see a new button in the private message that will allow you to send a file to another user that has entered the chat using the same signed applet. By clicking on the ‘File Transfer’ button you will be displayed with a new window from which you can select the local file to send. From here you can select the file you would like to send by clicking on the ‘Select File’ button, and then send the file by clicking on the ‘Send’ button. The person receiving the file will then receive a specialized private message, asking them to accept delivery of the file being sent to them. DigiChat‰ v4.0 Product Documentation 63 ©2002 Digi-Net Technologies, Inc To receive the file you need to click on the ‘File Transfer Requested’ message that appears as a private message. When that is done, a similar File Transfer window will open on the receiving end, allowing the user to select a location to save the file. After you select the location, click on the ‘Receive’ button to start the file transfer. NOTE: The File Transfer functionality uses a direct peer-to-peer connection between the two users transferring files, it does not interact with the server at all. Because of this, in order for the feature to work the two users must be able to establish a direct TCP connection on port 9000. If a firewall is blocking this, the feature will not work. Therefore, users behind a firewall connecting to DigiChat using HTTP Tunneling will not be able to utilize this feature. DigiChat‰ v4.0 Product Documentation 64 ©2002 Digi-Net Technologies, Inc Buddy List Functionality When a site has an integrated membership database, it will allow users to save their Buddy Lists. This is because all lists (and changes to them) are automatically updated in the applet, and the DigiChat server sends a message to a script (defined by you) to record the changes. The next time the user logs into the chat, your membership system would put the most updated buddies in the “buddyList” parameter. You will need to modify your existing membership system so that it can accept and record changes to a user’s Buddy List. The modifications will usually require that you add another CGI script to your membership system. This script would accept messages from the DigiChat Server and process them accordingly. There are three steps required: You must let the server know where the CGI script is located. Log in as ChatMaster and click on Set Site Options from the DigiChat menu. You will see a “Buddy List CGI URL” field - enter the URL where the script is located. Requests to the script have the following parts: User=somename Buddy=someothername Request=add or Request=remove “Somename” would be replaced with the name of the user requesting the change, while “someothername” is the user he is trying to change. “Request” specifies whether the user is adding or deleting a buddy and has the value of either “add” or “remove.” For example, let’s assume that Joe adds Jane to his Buddy List. Let’s also assume that you have created a script named “bscript” to handle to a person’s Buddy List and that this script is located at www.buddychat.com/. In such a case, the DigiChat server would connect to: http://www.buddychat.com/bscript?user=Joe&buddy=Jane&request=add Your membership system must also let the applet know which users are initially on a person’s Buddy List. This information is passed in as a parameter. The “buddyList” parameter has a list of names separated by commas. For example: <param name=“buddyList” value=“name1,name2,name3”> This parameter would add names 1, 2 and 3 to this person’s buddy list. Please note that commas and quotes are not allowed in a user’s name. Also, any leading or trailing spaces in a person’s name are ignored and names are casesensitive, so “Joe” does not equal “joe.” DigiChat‰ v4.0 Product Documentation 65 ©2002 Digi-Net Technologies, Inc Membership Database Integration The following section is for advanced users only. These parameters are not required for DigiChat to run. If you are not familiar with topics such as HTML, CGI, and databases, please skip this section. DigiChat supports many optional parameters that may be used to customize the appearance of the log-in screen, or to pass user information (such as a nickname) into the applet so user settings are preserved. These parameters allow you to pass information from a membership database, for example, to the DigiChat Client applet, allowing DigiChat to tie in neatly with your existing site membership system. DigiChat does not itself maintain a membership database. Instead, you may pass parameters in from your existing database using dynamic HTML generating tools such as Active Server Pages, Cold Fusion, Perl, or some other such CGI. Doing so is not necessary; these parameters are merely optional for those who wish to use them. Parameters are passed to the DigiChat applet via codes in the Chat.html file. In the code below, parameters have been added to pass the user's nickname, “John Boy,” and real name, “John Doe,” to the DigiChat applet. Use this example, and the list of parameters that follows, as a template. Add as many <PARAM NAME="parameter name" VALUE="parameter value"> codes as needed. <APPLET NAME="DigiChat" !!!!!CODEBASE="http://www.yourserver.com/DigiChat/DigiClasses/" !!!!!CODE="com.diginet.digichat.client.DigiChatApplet" !!!!!WIDTH="200" HEIGHT="100" ALIGN="MIDDLE" !!!!!ARCHIVE="client.jar"> !!!!!<PARAM NAME="siteID" VALUE="1000"> !!!!!<PARAM NAME="cabbase" VALUE="Client.cab"> !!!!!<PARAM NAME="background" VALUE="FFFFFF"> !!!!!<PARAM NAME="textcolor" VALUE="000000"> !!!!!<PARAM NAME="nickname" VALUE="John Boy"> !!!!!<PARAM NAME="realname" VALUE="John Doe"> !!!!!DigiChat requires a Java Compatible web browser to run. </APPLET> DigiChat‰ v4.0 Product Documentation 66 ©2002 Digi-Net Technologies, Inc Moderated Chat Functionality Using ChatMaster Overview Guest Speakers or discussion hosts provide an interesting and compelling community building option on your Web site. Visitors may interact with a celebrity or other individual who may have specific expertise of relevance or interest to the site offering chat services. Although it is possible to offer this feature continually, this type of interaction is typically promoted as an on-line event rather than a perpetual feature of the chat site. Where Guest Speakers or discussion hosts may be present within a chat forum, it is imperative to maintain control over the tone and flow of questions and comments. Beyond just vulgar language, there is always the potential that inappropriate or hostile commentary can derail the focus of a topical discussion. Many DigiChat plans/packages provide for the ability to conduct supervised forums where a Moderator can screen or filter incoming questions or comments to a Guest Speaker. This function equips the Moderator with additional tools, beyond those of the ChatMaster, to ensure smooth flow and appropriate conduct. This section is intended to provide Moderators and Guest Speakers with the basic functional aspects of conducting moderated chat sessions. This document assumes that both sites and rooms have already been configured for moderated chat via the steps detailed in the Managing Sites and Managing Rooms sections. If you are a Moderator or Guest Speaker and you are uncertain as to whether your site or room has been properly configured, consult your site administrator. It is assumed that you have promoted your chat event and notified its Guest Speakers on of how to find the room, the time frame during which it will occur and any passwords that chat users may need to access the room. Both the Moderators and Guest Speakers will enter the chat room via the ChatMaster application using their account passwords and nicknames. A Moderator’s nickname will appear in blue while a Guest Speaker’s nickname will appear in red. All regular visitors’ nicknames will appear in black. DigiChat‰ v4.0 Product Documentation 67 ©2002 Digi-Net Technologies, Inc Conducting a Moderated Chat At any time during a moderated chat discussion, the Moderators and/or Guest Speakers may exercise the administrative capabilities assigned by the ChatMaster. These powers may include kicking or banning of disruptive chat users or modifying of interface elements. The Ignore button, which a chat user would typically use as a (self-defense) mechanism to mute annoying or abusive fellow chat users, will not function with Moderators or Guest Speakers. Nor does it affect the way in which the Moderators or Guest Speakers interact with one chat user being ignored by another. Moderator Control Unlike those of a ChatMaster, Moderator or Guest Speaker, messages sent by a chat user do not immediately post for all to see. The Moderator must first screen each message before it is forwarded to a Guest Speaker or posted to the chat room. This is described in greater detail below. A chat user may not send private messages to someone who is functioning solely as a Guest Speaker as configured under Accounts. Private messages may, however, be sent to a Moderator, even if that Moderator doubles as a Guest Speaker. Any individual logging into a chat session using the ChatMaster application may privately message a Guest Speaker. DigiChat‰ v4.0 Product Documentation 68 ©2002 Digi-Net Technologies, Inc As a discussion is occurring, the Moderator is the first, and possibly the only, individual to see incoming messages from the chat user. As a user posts a message, the Moderator sees the message appear in a pop-up window labeled ‘Moderated Queue’. This window will contain all messages sent by all users, and will remain consistent over multiple Moderator sessions. That is if you have multiple Moderators logged in at one time they will see the same list of messages posted by your users. The Moderator simply clicks on the inbound message to open the Moderator Controls window. By doing this, the message in the Moderated Queue is changed to the color red, as an indicator to any additional moderators that the message is being handled. DigiChat‰ v4.0 Product Documentation 69 ©2002 Digi-Net Technologies, Inc The Moderator Controls window offers the Moderator a number of options. These include immediately publishing the message to everyone including the Guest Speakers by clicking the All Users button or sending the message only to the Guest Speakers by clicking the Guests button. If the user’s question or comment is inappropriate, unclear or can be answered directly by the Moderator personally, two text fields are provided for the Moderator to either edit the user’s original message or to send a private message back to the user by clicking the (User’s Name) button. In fact, any message typed by the Moderator in this window can be sent to the User, All Users or just the Guest by selecting the appropriate button. DigiChat‰ v4.0 Product Documentation 70 ©2002 Digi-Net Technologies, Inc This window also includes a checkbox option that allows the Moderator to include the original comment for reference when privately responding to or publicly displaying messages. Once the Moderator approves a message and posts it to the Guest Speaker for all to see, it may be responded to, publicly or privately, by anyone receiving it as per normal DigiChat function. The moderator may also communicate with all participants in the room by typing messages in normally through the ChatMaster window without utilizing the Moderator Controls window. DigiChat‰ v4.0 Product Documentation 71 ©2002 Digi-Net Technologies, Inc DigiChat Bots Overview DigiChat now offers an open Bot API (Application Programming Interface) which can be used to create a uniquely customized chatroom experience. The Bot API, which utilizes the Java programming language, can be used to create a user in the chat room and specify their actions based on any number of events that occur. Running the Included Bots Before running any Bot, you must first create an account for it on your site. You do this from the DigiChat ChatMaster. (DigiChat > Set Site Options > Accounts) The account you create must be given the ‘Bot’ permission. NOTE: Do not give any normal ChatMaster account the ‘Bot’ permission, this will disable the account. Included with the DigiChat installer are six default Bots: Weather Bot, Stock Bot, Translation Bot, Trivia Bot, Seen Bot, and Zeus Bot. These bots are included in the ‘Bots’ subdirectory of the DigiChat install directory. To run these bots change directory (cd) to the ‘Bots’ directory from the command line, and run the following commands: WeatherBot: java –cp BotAPI.jar:weather.jar com.diginet.digichat.client.bot.WeatherBot <username> <password> <host> <siteID> (all on one line) (replace ‘:’ with ‘;’ on Windows platforms) StockBot: java –cp BotAPI.jar:stock.jar com.diginet.digichat.client.bot.StockBot <username> <password> <host> <siteID> (all on one line) (replace ‘:’ with ‘;’ on Windows platforms) TranslationBot: java –cp BotAPI.jar:translate.jar com.diginet.digichat.client.bot.TranslationBot <username> <password> <host> <siteID> (all on one line) (replace ‘:’ with ‘;’ on Windows platforms) TriviaBot: java –cp BotAPI.jar:trivia.jar TriviaBot <username> <password> <host> <siteID> (replace ‘:’ with ‘;’ on Windows platforms) SeenBot: java –cp BotAPI.jar:seen.jar SeenBot <username> <password> <host> <siteID> (replace ‘:’ with ‘;’ on Windows platforms) DigiChat‰ v4.0 Product Documentation 72 ©2002 Digi-Net Technologies, Inc ZeusBot: java –cp BotAPI.jar:zeus.jar ZeusBot <username> <password> <host> <siteID> (replace ‘:’ with ‘;’ on Windows platforms) After launching one of these processes you will see your Bot User logged into the chat room. Send the Bot user a private message with the text ‘help’ to get instructions on how to use the bot. Getting New Bots Digi-Net currently maintains a collection of all Bots created for DigiChat. You can access this collection at http://developer.digi-net.com. If you feel you’ve got what it takes to create your own, check out the next section. But don’t forget to submit it to Digi-Net’s Bot Collection. DigiChat‰ v4.0 Product Documentation 73 ©2002 Digi-Net Technologies, Inc Creating Your Own Bots We have opened up a full Java-API for our Bot technology, to allow you to add your own functionality to DigiChat by creating your own Bots. Use the following API to develop your com.diginet.digichat.client.bot Interface Bot public interface Bot The interface which is used to define the methods that the BotAPI looks for in any implemented Bot. All Bots should implement this class. Author: DigiNet Technologies, Inc. See Also: BotAPI Method Summary void closeDown() !!!!!!!!!!Bot will receive this call when an error has occurred or after a logout is complete. void loginComplete(boolean succeeded) !!!!!!!!!!Bot will receive this call after the login to the server is complete. void receiveMessage(java.lang.String userName, java.lang.String text) !!!!!!!!!!Bot will receive this call when an incoming message to the current room is received. void receivePrivateMessage(java.lang.String userName, java.lang.String text) !!!!!!!!!!Bot will receive this call when an incoming private message to this Bot is received. void receiveProfile(java.lang.String user, java.util.Properties profile) !!!!!!!!!!Bot will receive this call when a requested profile is returned from the server. void rejectLogin(java.lang.String reason) !!!!!!!!!!Bot will receive this call when an when the server fails to login. DigiChat‰ v4.0 Product Documentation 74 ©2002 Digi-Net Technologies, Inc Method Detail loginComplete public void loginComplete(boolean succeeded) Bot will receive this call after the login to the server is complete. Parameters: succeeded - Whether the login was successful. If false, a call to rejectLogin will follow. See Also: rejectLogin(java.lang.String) receiveMessage public void receiveMessage(java.lang.String userName, java.lang.String text) Bot will receive this call when an incoming message to the current room is received. Parameters: userName - Name of the user sending the message text - The message being received receivePrivateMessage public void receivePrivateMessage(java.lang.String userName, java.lang.String text) Bot will receive this call when an incoming private message to this Bot is received. Parameters: userName - Name of the user sending the message text - The message being received rejectLogin public void rejectLogin(java.lang.String reason) Bot will receive this call when an when the server fails to login. Parameters: text - The reason for the failed attempt. receiveProfile public void receiveProfile(java.lang.String user, java.util.Properties profile) Bot will receive this call when a requested profile is returned from the server. Keys for the properties object are as follows (all lowercase): realname, comments, DigiChat‰ v4.0 Product Documentation 75 ©2002 Digi-Net Technologies, Inc url, email, age, gender, name, roomname, ipaddress, hostname. A key will be set to an empty string if nothing is provided by the user. Parameters: user - User name of the profile returned profile - The properties object which contains the profile See Also: BotAPI.requestProfile(java.lang.String) closeDown public void closeDown() Bot will receive this call when an error has occurred or after a logout is complete. DigiChat‰ v4.0 Product Documentation 76 ©2002 Digi-Net Technologies, Inc com.diginet.digichat.client.bot Class BotAPI java.lang.Object | +--com.diginet.digichat.client.bot.BotAPI All Implemented Interfaces: java.lang.Runnable public class BotAPI extends java.lang.Object implements java.lang.Runnable The DigiChat Bot API which connects to a DigiChat server and allows interaction with users. Author: DigiNet Technologies, Inc. See Also: Bot Constructor Summary BotAPI(Bot bot) !!!!!!!!!!Constuctor used to access BotAPI. Method Summary void connect(java.lang.String name, java.lang.String password, java.lang.String host, int siteID, java.lang.String ports) !!!!!!!!!!Connects Bot to a specified site on a DigiChat Server. void createRoom(java.lang.String name, java.lang.String topic, java.lang.String password, int userMax, boolean temporary) !!!!!!!!!!! void enterRoom(java.lang.String room, java.lang.String password) !!!!!!!!!!Requests to enter a room java.lang.String getCurrentRoom() !!!!!!!!!!Gets the name of the current room java.lang.String[] getRoomNames() !!!!!!!!!!Gets the current list of room names DigiChat‰ v4.0 Product Documentation 77 ©2002 Digi-Net Technologies, Inc !!!!!!!!!!Gets the current list of room names int getUserCountForRoom(java.lang.String room) !!!!!!!!!!Gets the number of users for a specific room. java.lang.String[] getUsersForRoom(java.lang.String room) !!!!!!!!!!Gets a list of user names for a specific room. boolean isConnected() !!!!!!!!!!Query the current state of the connection to the server. void kickUser(java.lang.String userName, boolean banIP, boolean banHost, java.lang.String text) !!!!!!!!!!Requests for a user to be kicked by the bot. void logout() !!!!!!!!!!Logout the Bot from the DigiChat Server. void requestProfile(java.lang.String userName) !!!!!!!!!!Requests a profile for a user. void run() !!!!!!!!!!! void sendChatBroadcast(java.lang.String userName, java.lang.String room, java.lang.String msg) !!!!!!!!!!Requests for a chat broadcast to be sent. void sendMessage(java.lang.String message) !!!!!!!!!!Send a regular message to the current room void sendPrivateMessage(java.lang.String user, java.lang.String message) !!!!!!!!!!Sends a private message to specified user void setIconID(int iconID) !!!!!!!!!!Sets the icon which is displayed next to Bot messages and in the user list. void setInvisible(boolean set) !!!!!!!!!!Sets the invisible flag which requests an invisible login to the server. Methods inherited from class java.lang.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait DigiChat‰ v4.0 Product Documentation 78 ©2002 Digi-Net Technologies, Inc ! Constructor Detail BotAPI public BotAPI(Bot bot) Constuctor used to access BotAPI. Method Detail connect public void connect(java.lang.String name, java.lang.String password, java.lang.String host, int siteID, java.lang.String ports) throws java.lang.Exception Connects Bot to a specified site on a DigiChat Server. Throws!java.net.SocketException Socket exception thrown if it cannot acknowledge with server. Throws!java.lang.Exception Exception thrown if socket cannot connect with server Parameters: name - Name of the Bot account to connect with password - Password of the Bot account host - Hostname or IP of the chat server siteID - SiteID of the site to connect to ports - String containing port number(s) separated by commas without spaces. Pass null to use defaults isConnected public boolean isConnected() Query the current state of the connection to the server. This will be true after the login has completed and false after the logout is complete. Returns: State of the connection kickUser public void kickUser(java.lang.String userName, boolean banIP, boolean banHost, java.lang.String text) Requests for a user to be kicked by the bot. This will not overide the account permission and therefore do nothing if the bot account does not have permission to kick users. This will also return with no action if the user the bot is trying to DigiChat‰ v4.0 Product Documentation 79 ©2002 Digi-Net Technologies, Inc kick has the "Do Not Kick" permission. The bot must also have the "Edit Banned Users" flag for the banIP or banHost to take effect. Parameters: userName - The requested user to kick banIP - Whether the IP of the user should be banned as well banHost - Whether the host name of the user should be banned as well text - The text to send the user for the reason they are being kicked (null for default) setInvisible public void setInvisible(boolean set) Sets the invisible flag which requests an invisible login to the server. This will not overide the account permission and therefore will do nothing if the bot account does not have permission to be invisible. Parameters: set - The requested state to enter setIconID public void setIconID(int iconID) Sets the icon which is displayed next to Bot messages and in the user list. Parameters: iconID - Icon ID of the icon to select See Also: Bot.loginComplete(boolean) enterRoom public void enterRoom(java.lang.String room, java.lang.String password) Requests to enter a room Parameters: room - Name of room to enter password - Password of the room to enter (null if no password) getCurrentRoom public java.lang.String getCurrentRoom() Gets the name of the current room Returns: Name of room currently in getUserCountForRoom public int getUserCountForRoom(java.lang.String room) DigiChat‰ v4.0 Product Documentation 80 ©2002 Digi-Net Technologies, Inc Gets the number of users for a specific room. Parameters: room - Name of room to count Returns: int Number os users in room, 0 if none getUsersForRoom public java.lang.String[] getUsersForRoom(java.lang.String room) Gets a list of user names for a specific room. Parameters: room - Name of room to get users for Returns: Array which contains all of the users currently logged in getRoomNames public java.lang.String[] getRoomNames() Gets the current list of room names Returns: String[] array which contains all of the rooms createRoom public void createRoom(java.lang.String name, java.lang.String topic, java.lang.String password, int userMax, boolean temporary) requestProfile public void requestProfile(java.lang.String userName) Requests a profile for a user. Note: This call is asynchronous and the bot should listen for a receiveProfile call Parameters: userName - Name of user to request profile for See Also: Bot.receiveProfile(java.lang.String, java.util.Properties) sendChatBroadcast public void sendChatBroadcast(java.lang.String userName, java.lang.String room, java.lang.String msg) Requests for a chat broadcast to be sent. This will not overide the account permission and therefore do nothing if the bot account does not have permission DigiChat‰ v4.0 Product Documentation 81 ©2002 Digi-Net Technologies, Inc to send chat broadcasts. Will not send a mesasge if no room/user is found with specified room/user name (with exception of null for all rooms/users). Parameters: userName - The user for the broadcast to be sent to (null for all users) room - The room for the broadcast to be sent to (null for all rooms) msg - The message to broadcast sendPrivateMessage public void sendPrivateMessage(java.lang.String user, java.lang.String message) Sends a private message to specified user Parameters: user - User name of recipient message - Message to send sendMessage public void sendMessage(java.lang.String message) Send a regular message to the current room Parameters: message - Message to send logout public void logout() Logout the Bot from the DigiChat Server. run public void run() Specified by: run in interface java.lang.Runnable DigiChat‰ v4.0 Product Documentation 82 ©2002 Digi-Net Technologies, Inc DigiChat Commander Overview DigiChat Commander is a command-line interface that can be used to send and retrieve information and commands to and from the DigiChat Server. DigiChat Commander also has a Java API allowing its functions to be accessed from within Java programs. While not intended as a replacement for the full administration of DigiChat ChatMaster, it does make it possible to perform many common tasks in an automated manner. For more information about the Commander Java API, see the commander.html file included in your DigiChat Server installation. The Commander can perform the following tasks from the command-line or through the API: • Return the server status, including number of current connections, highest number of simultaneous connections, active threads, and total number of users who have accessed the server • Return a list of sites running on the Server, including number of current connections, highest number of simultaneous connections, time of the last new connection, and total number of users who have accessed the site. (DigiChat Commander may be instructed to exclude sites without any active connections) • Return a list of rooms open on a particular DigiChat site (DigiChat Commander may be instructed to exclude empty rooms) • Return a list of users on a particular DigiChat site or in a particular room. • Send a ChatBroadcast to all users in all sites, all users on a particular site, all users in a particular room, or to a single user. A ChatBroadcast message will appear in a separate window above the main chat window, increasing its visibility. • Send a DigiCast message to all users on a particular chat site, to all users in a particular room, or to a single user. A DigiCast message appears in the main chat window just like a regular message, complete with its own icon, name, and message. • Create or delete a room on a particular DigiChat site. • Add “Allowed hosts” to a particular site. • Create or delete sites on the server. • Restart a specific site on the server. DigiChat‰ v4.0 Product Documentation 83 ©2002 Digi-Net Technologies, Inc Command Line Interface The DigiChat Commander is a Java application, and is launched in a similar manner as the DigiChat Server. The instructions for each task assume that you have installed a Java Runtime Environment (JRE) on your Server and that JRE has been added to the system path (the PATH environment variable on UNIX systems. It is also assumed the command jre is used to invoke Java on your system. If another command, such as java is used, replace jre in the instructions with the appropriate command. The DigiChat Commander is contained in Commander.zip. As a security precaution, you should only grant execute privileges for this file to authorized users. Launching To launch the DigiChat Commander, change directory (cd) to the location where DigiChat Server was installed, then enter the following command: java –cp Commander.zip com.diginet.digichat.commander.Commander broadcast | createAllowedHost | createRoom | createSite | createTempRoom | deleteRoom | deleteSite | post | restartSite | rooms | sites | status | users [arguments] [-p|e] You may use the optional p switch if you want DigiChat Commander to pause before quitting after the command is sent. Available arguments are: name ”<name>“ siteID <siteID> text ”<message>“ toRoom <room ID> | ”<room name>“ toUser <user ID> | ”<user name>“ icon <icon ID> name ”<room name>“ topic ”<room topic>“ host <hostname or IP> moderated true hostname <hostname or IP> userMax <user count> ports <port,port,port,port> password <Commander password> Not all arguments are used with all commands. When using an argument value that has multiple words (such as with name or text), be sure to use double quotes (") around the value. If you need to include a double quote in the value, use backslash-quote (\") in its place. If you need to include a backslash in the value, use backslash-backslash (\\) in its place. In order for Commander to be secure, you need to set a Commander password. Thus, for practical purposes, the password argument is required. If you are sending Commander requests to a server that is not on the same computer that you are running Commander, the host argument is required. If your Server uses the ports option to use an alternate set of ports to communicate with, you must use the ports argument so that Commander will use matching ports. For simplicity, these arguments will be left out of the examples below. DigiChat‰ v4.0 Product Documentation 84 ©2002 Digi-Net Technologies, Inc Returning the Server Status To return the status of the server, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander status This will return the status for your server, similar to the following: Running since: Dec 12, 2001 6:03:32 PM Current connections: 1026 Total hits: 3265 Last Connection: Dec 17, 2001 5:23:42 PM Applet Location: /var/www/html/DigiChat/ Returning a List of Sites To return a list of sites on your server, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander sites [-e] This will return a list of sites running on your server, similar to the following: SiteID Users Max Hits Name ----------------------------------------------0 0 1 7 Admin 1000 6 19 32 MangoChat 1001 0 4 7 AdvocadoChat 1002 0 11 29 FigChat 1003 7 25 72 AppleChat Returning a List of Rooms To return a list of rooms on a particular site, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander rooms siteID <siteID> [name ”<name>“|”<prefix>*“] [-e] This will return a list of rooms and the number of users in each room on the specified site, similar to the following: RoomID #Users Name ------------------------------------1000 13 DigiChat Foyer 1001 5 Papaya Room 1002 13 Kiwi Fruit Room DigiChat‰ v4.0 Product Documentation 85 ©2002 Digi-Net Technologies, Inc Returning a List of Users To return a list of users on a particular site or in a particular room, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander users siteID <siteID> [toRoom <roomID> | ”<roomname>“] This will return a list of users, similar to the following: UserID RoomID Name Connected from ---------------------------------------------------------65 1 Jack station1.mynet.com/123.45.67.2 7 0 Sam station2.mynet.com/123.45.67.3 17 0 Samantha station3.mynet.com/123.45.67.4 8 1 Laura station4.mynet.com/123.45.67.5 43 1 Jane station5.mynet.com/123.45.67.6 Sending a Chat Broadcast To send a Chat Broadcast to connected users, enter the following command: jre -cp Commander.zip com.diginet.digichat.commander.Commander broadcast text ”<message>“ [siteID <siteID>] [toRoom <roomID> | ”<room name>“] [toUser <userID> | ”<user name>“] This will send the specified message in a separate pop-up window on each user’s screen. Options • • • Include the siteID argument to send the message only to users on a particular site. Obtain this siteID number by using the command for Returning a List of Sites. Omit it to send to all sites. Include the toRoom argument to send the message only to users in a particular room. Specify a room ID or room name in quotes. When using this argument, you must also specify a siteID. Include the toUser argument to send the message to only a particular user. You may specify a user ID or user name in quotes. DigiChat‰ v4.0 Product Documentation 86 ©2002 Digi-Net Technologies, Inc Sending a DigiCast Message To send a DigiCast message to connected users, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander post text ”<message>“ name ”<message title>“ siteID <siteID> icon <iconID> [toRoom <roomID> | ”<room name>“] [toUser <user name>] This will send the specified message in the main chat window of the user. Options • • • • • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. Use the name argument to specify a title for the DigiCast message. This title is displayed above the text of the message where the user name would normally appear. Use the icon argument to use an icon for the message. Icon Ids can be obtained by logging in as ChatMaster and viewing the list of icons in the Site Options dialog box. Include the toRoom argument to send the message only to users in a particular room. Specify a room ID or name in quotes. Include the toUser argument to send the message only to a particular user. Specify a user ID or name in quotes. Creating a New Room To create a new room on a specific site, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander createRoom siteID <siteID> name ”<room name>“ [topic ”<room topic>“] This will create a new room on the site. Options • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. • Use the name argument to specify the name of the room being created. • Include the topic argument to specify a topic for the room being created. DigiChat‰ v4.0 Product Documentation 87 ©2002 Digi-Net Technologies, Inc Creating a New Temporary Room To create a new temporary room on a specific site, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander createTempRoom siteID <siteID> name ”<room name>“ [topic ”<room topic>“] This will create a new temporary room on the site. Options • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. • Use the name argument to specify the name of the room being created. • Include the topic argument to specify a topic for the room being created. Deleting a Room To delete a room on a specific site, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander deleteRoom siteID <siteID> toRoom <roomID> This will delete the room with the specified ID on the site. Options • • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. The roomID argument is required. Obtain this roomID by using the command for Returning a List of Rooms. Creating a Site To create a new site on the server, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander createSite name <site name> userMax <user count> [moderated true] This will create a new site on your server. Options • Use the name argument to specify the site name. • Use the userMax argument to specify the maximum number of users allowed on the site. For unlimited user (subject to server limits), leave out this argument • Use the moderated argument to enable the moderated chat feature on this site. DigiChat‰ v4.0 Product Documentation 88 ©2002 Digi-Net Technologies, Inc Deleting a Site To delete a site on the server, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander deleteSite siteID <siteID> This will delete the site with the specified ID on the server. Options • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. Restarting a Site To restart a site on the server, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander restartSite siteID <siteID> This will restart the site with the specified ID on the server. Options • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. Adding an Allowed Host To add an entry to a site’s Allowed Host list, enter the following command: jre –cp Commander.zip com.diginet.digichat.commander.Commander createAllowedHost siteID <siteID> hostname <hostname or IP> This will add the specified host name to the site’s Allowed Host list. Options • The siteID argument is required. Obtain this siteID number by using the command for Returning a List of Sites. • The hostname argument specifies the host name to be added to the list. DigiChat‰ v4.0 Product Documentation 89 ©2002 Digi-Net Technologies, Inc Java API com.diginet.digichat.commander Class Commander java.lang.Object | +--com.diginet.digichat.commander.Commander public class Commander extends java.lang.Object Commander is a programmatic way to manipulate the DigiChat Server. It can be used either as a command-line program or by accessing it's public methods from a Java program. Constructor Summary Commander() !!!!!!!!!!Constuctor used when accessed via API. Commander(java.lang.String[] args) !!!!!!!!!!Constructor used when accessed by command-line or command line simulation. Method Summary void addAccount(java.lang.String userName, java.lang.String modelFlags, int modelFlagsID, java.lang.String newpassword) !!!!!!!!!!Adds an account to the site connected to. void broadcast(java.lang.String name, java.lang.String text) !!!!!!!!!!Send a chat broadcast message to all rooms on current site. void broadcast(java.lang.String name, java.lang.String text, int roomID) !!!!!!!!!!Send a chat broadcast message to all users in a room on current site. void broadcastAll(java.lang.String name, java.lang.String text) !!!!!!!!!!Send a chat broadcast message to all sites. boolean checkForExistingSite(java.lang.String siteName) !!!!!!!!!!Determines whether a site currently exists with a certain name. DigiChat‰ v4.0 Product Documentation 90 ©2002 Digi-Net Technologies, Inc name. void connect(java.lang.String host, java.lang.String password, int siteID, java.lang.String ports) !!!!!!!!!!Connects Commander to a site on a DigiChat Server. void createAllowedHost(java.lang.String hostname) !!!!!!!!!!Adds an allowed host to the current site's allowed host table. void createRoom(java.lang.String name, java.lang.String topic, java.lang.String password, int userMax, boolean temporary, boolean moderated) !!!!!!!!!!Creates a new room on the current site. void createSite(java.lang.String name, int userMax, boolean moderated) !!!!!!!!!!Creates a new site on the server. void createSite(java.lang.String name, int userMax, boolean moderated, boolean digiposts, int hostedCustomerId) !!!!!!!!!!Creates a new site on the server. void deleteAccount(java.lang.String username, int userID) !!!!!!!!!!Deletes an account from the site connected to. void deleteRoom(int roomID) !!!!!!!!!!Deletes room on current site with specified ID. void deleteSite(int siteID) !!!!!!!!!!Deletes site with specified ID from server. void disconnect() !!!!!!!!!!Disconnect Commander from DigiChat Server. java.util.Vector getAccounts() !!!!!!!!!!Supplies account information for a given site. java.util.Vector getRooms(java.lang.String nameFilter, boolean includeEmpty) !!!!!!!!!!Supplies room information for a site. int getSiteIDforName(java.lang.String siteName) !!!!!!!!!!Determines what a site's ID is. java.util.Vector getSites(boolean includeEmpty) !!!!!!!!!!Supplies site information. java.util.Hashtable getStatus() !!!!!!!!!!Supplies server information. java.util.Vector getUsers(int roomID) !!!!!!!!!!Supplies user information for a given site and room. void listAccounts() !!!!!!!!!!Writes account information in text format to System.out. DigiChat‰ v4.0 Product Documentation 91 ©2002 Digi-Net Technologies, Inc !!!!!!!!!!Writes account information in text format to System.out. void listRooms(java.lang.String nameFilter, boolean includeEmpty) !!!!!!!!!!Writes room information in text format to System.out. void listSites(boolean includeEmpty) !!!!!!!!!!Writes site information in text format to System.out. void listStatus() !!!!!!!!!!Writes server status information in text format to System.out. void listUsers(int roomID) !!!!!!!!!!Writes user information for current site in text format to System.out. static void main(java.lang.String[] args) !!!!!!!!!!Entry point when being Commander is accessed from the command line. void post(java.lang.String name, java.lang.String text, int iconID) !!!!!!!!!!Send DigiPost to users in all room on current site. void post(java.lang.String name, java.lang.String text, int iconID, int roomID) !!!!!!!!!!Send DigiPost to users in a room on current site. void restartSite(int siteID) !!!!!!!!!!Restarts a site. void updateAccount(java.lang.String userName, java.lang.String newpassword) !!!!!!!!!!! Methods inherited from class java.lang.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait DigiChat‰ v4.0 Product Documentation 92 ©2002 Digi-Net Technologies, Inc Constructor Detail Commander public Commander() Constuctor used when accessed via API. Commander public Commander(java.lang.String[] args) Constructor used when accessed by command-line or command line simulation. Parameters: args - command line parameters Method Detail main public static void main(java.lang.String[] args) Entry point when being Commander is accessed from the command line. Parameters: args - command line parameters broadcast public void broadcast(java.lang.String name, java.lang.String text) throws java.io.IOException Send a chat broadcast message to all rooms on current site. Parameters: name - Name of the broadcast message text - Text of broadcast message broadcast public void broadcast(java.lang.String name, java.lang.String text, int roomID) throws java.io.IOException Send a chat broadcast message to all users in a room on current site. Parameters: name - Name of the broadcast message text - Text of broadcast message roomID - ID of room to broadcast to DigiChat‰ v4.0 Product Documentation 93 ©2002 Digi-Net Technologies, Inc broadcastAll public void broadcastAll(java.lang.String name, java.lang.String text) throws java.io.IOException Send a chat broadcast message to all sites. Requires connection to the Admin site. Parameters: name - name of the broadcast message text - text of broadcast message checkForExistingSite public boolean checkForExistingSite(java.lang.String siteName) Determines whether a site currently exists with a certain name. Parameters: siteName - name to check for Returns: whether or not the site exists connect public void connect(java.lang.String host, java.lang.String password, int siteID, java.lang.String ports) throws java.lang.Exception Connects Commander to a site on a DigiChat Server. Parameters: host - nostname or IP of the chat server siteID - siteID of the site to connect to. All future methods will access this site. Selecting siteID of 0 will connect to the Admin site. Some functions require connection to the Admin site. ports - string containing port number(s) separated by commas w/o spaces. Pass null to use defaults. createAllowedHost public void createAllowedHost(java.lang.String hostname) throws java.io.IOException Adds an allowed host to the current site's allowed host table. Parameters: hostname - Host name or IP to add to the table createSite public void createSite(java.lang.String name, int userMax, boolean moderated) DigiChat‰ v4.0 Product Documentation 94 ©2002 Digi-Net Technologies, Inc throws java.io.IOException Creates a new site on the server. Requires connection to the Admin server. Parameters: name - Name of the site userMax - Maximum number of users allowed on the site. Use 0 for unlimited. moderated - Pass true to enable moderation on this site, false to disallow. createSite public void createSite(java.lang.String name, int userMax, boolean moderated, boolean digiposts, int hostedCustomerId) throws java.io.IOException Creates a new site on the server. Requires connection to the Admin server. Parameters: name - Name of the site userMax - Maximum number of users allowed on the site. Use 0 for unlimited. moderated - Pass true to enable moderation on this site, false to disallow. createRoom public void createRoom(java.lang.String name, java.lang.String topic, java.lang.String password, int userMax, boolean temporary, boolean moderated) throws java.io.IOException Creates a new room on the current site. Parameters: name - Name of the room topic - Topic of the room password - Password for room userMax - Maximum number of users in room. Use 0 for unlimited. temporary - Pass true for temporary room, false for permanent moderated - Pass true to enable moderation on this site, false to disallow. deleteRoom public void deleteRoom(int roomID) throws java.io.IOException Deletes room on current site with specified ID. Parameters: roomID - ID of the room to delete DigiChat‰ v4.0 Product Documentation 95 ©2002 Digi-Net Technologies, Inc deleteSite public void deleteSite(int siteID) throws java.io.IOException Deletes site with specified ID from server. Requires connection to Admin site. Parameters: siteID - ID of the site to delete disconnect public void disconnect() throws java.io.IOException Disconnect Commander from DigiChat Server. getRooms public java.util.Vector getRooms(java.lang.String nameFilter, boolean includeEmpty) Supplies room information for a site. Parameters: nameFilter - Optional string to match room names against (pass "*" to match all) includeEmpty - Pass true to include empty rooms, false to exclude Returns: A Vector of Hashtables. Each Hashtable contains info about one room key (all Strings) -- value "ID" -- (Integer)room ID "name" -- (String)room name "userCount" -- (Integer)number of users getSiteIDforName public int getSiteIDforName(java.lang.String siteName) Determines what a site's ID is. Parameters: siteName - name to check for Returns: what the id of the site is, 0 if non-existant. getSites public java.util.Vector getSites(boolean includeEmpty) Supplies site information. Parameters: includeEmpty - Pass true to include empty sites, false to exclude Returns: DigiChat‰ v4.0 Product Documentation 96 ©2002 Digi-Net Technologies, Inc A Vector of Hashtables. Each Hashtable contains info about one site key (all Strings) -- value "hits" -- (Integer)total hits "ID" -- (Integer)site ID "lastConnection -- (Date)last login time "name" -- (String)site name "userCount" -- (Integer)number of users "userMax" -- (Integer)maximum users getStatus public java.util.Hashtable getStatus() Supplies server information. Returns: A Hashtable with the following entries: key (all Strings) -- value "runningSince" -- (Date)server start time "currentConnections" -- (Integer)current connections "totalHits" -- (Integer)total hits "lastConnection" -- (Date)last connection (if there is a last conection) "appletLocation" -- (String)path to applet directory getUsers public java.util.Vector getUsers(int roomID) Supplies user information for a given site and room. Returns: a Vector of Hashtables Each Hashtable contains info about one user key (all Strings) -- value "ID" -- (Integer)userID "name" -- (String)nickname "roomID" -- (Integer)roomID "IP" -- (String)ip address "hostName" -- (String)host name "roomName" -- (String)room name getAccounts public java.util.Vector getAccounts() Supplies account information for a given site. Returns: a Vector of Hashtables Each Hashtable contains info about one user key (all Strings) -- value "ID" -- (Integer)accountID "name" -- (String)name DigiChat‰ v4.0 Product Documentation 97 ©2002 Digi-Net Technologies, Inc listAccounts public void listAccounts() Writes account information in text format to System.out. deleteAccount public void deleteAccount(java.lang.String username, int userID) throws java.io.IOException Deletes an account from the site connected to. Parameters: username - Username of account to delete. userID - userID of account to delete (either may be specified). updateAccount public void updateAccount(java.lang.String userName, java.lang.String newpassword) throws java.io.IOException addAccount public void addAccount(java.lang.String userName, java.lang.String modelFlags, int modelFlagsID, java.lang.String newpassword) throws java.io.IOException Adds an account to the site connected to. Parameters: username - Username of account to add. modelFlags - username to model the new account's flags after. modelFlagsID - userID to model the new account's flags after (either may be specified). newpassword - Password of the new account. listRooms public void listRooms(java.lang.String nameFilter, boolean includeEmpty) Writes room information in text format to System.out. Parameters: nameFilter - Optional string to match room names against (pass null not to match) includeEmpty - Pass true to include empty rooms, false to exclude DigiChat‰ v4.0 Product Documentation 98 ©2002 Digi-Net Technologies, Inc listSites public void listSites(boolean includeEmpty) Writes site information in text format to System.out. Requires connection to Admin site. Parameters: includeEmpty - Pass true to include empty sites, false to exclude listStatus public void listStatus() Writes server status information in text format to System.out. Requires connection to Admin site. listUsers public void listUsers(int roomID) Writes user information for current site in text format to System.out. Parameters: roomID - restrict output to room or use MessageConstants.kToAll for all rooms post public void post(java.lang.String name, java.lang.String text, int iconID) throws java.io.IOException Send DigiPost to users in all room on current site. Parameters: name - Name of DigiPost text - text of DigiPost iconID - ID of icon for DigiPost post public void post(java.lang.String name, java.lang.String text, int iconID, int roomID) throws java.io.IOException Send DigiPost to users in a room on current site. Parameters: name - Name of DigiPost text - text of DigiPost iconID - ID of icon for DigiPost roomID - ID of room to send DigiPost to DigiChat‰ v4.0 Product Documentation 99 ©2002 Digi-Net Technologies, Inc restartSite public void restartSite(int siteID) throws java.io.IOException Restarts a site. Requires connection to Admin site. Parameters: siteID - ID of the site to restart DigiChat‰ v4.0 Product Documentation 100 ©2002 Digi-Net Technologies, Inc