Manhattan's chat module allows students and teachers to exchange short text messages in real time. The use of Manhattan's chat module from the perspective of a teacher or student is fully discussed in Manhattan's Teacher's Reference, which you should read for a full understanding of chat. As the system administrator, your responsibilities are to:
Start the chat service - no one can use chat until the system administrator takes this step.
Periodically check to make sure the service is still running, and perhaps stop and re-start the service.
Periodically view/delete the system logs associated with chat, to make sure they don't grow too large.
Manhattan uses a modified version of Christian Walter's Melange chat. The tools for controlling the Melange chat service are under the Manage chat link on the administrator's menu:

No one can use chat until the system administrator starts the chat service. After clicking on the Manage chat link from the administrator's main menu, you'll come to a second menu, where each item is described in some detail. The third item down allows you to start the chat service:

Click on the link now, and you'll get a simple confirmation that a command was issued to start the service.
![]() |
The melange chat service runs on a particular port. The port for your installation is controlled by the MELANGE_PORT #define in custom.h and is set when you install Manhattan. The default port is 6661. If your network is protected by a firewall, and if you want students and teachers to be able to use the chat module, you must open up access to whatever port chat is running on. |
![]() |
If you are running more than one installation of Manhattan on a server, each installation must use a different port number for chat. |
The first item on the Melange Chat Administration menu allows the system administrator to enter chat:

The primary reasons for doing this are:
To verify for yourself that chat is working.
To make sure no one is using chat before you stop (and then possibly restart) the chat service.
When all is well with chat, you'll get a window like this:

You can click on the Who is logged on? button to see if others are using chat at this moment. You should also try entering some text in the Message: area and hitting your Enter key to prove to yourself that chat is working properly. When you are done, click the Logoff button, then close the chat window.
A few notes:
Your web browser must have a recent Java Virtual Machine (JVM), preferably downloaded from Sun at http://java.sun.com, installed in order to use chat. The same applies to students and teachers. Consult the chapter on chat in Manhattan's Teacher's Reference for details.
Besides not having a JVM installed (or an old or otherwise incompatible JVM installed) the second most common reason for chat problems is that your firewall is blocking traffic on the chat port. The port chat runs on is listed at the top of your "Melange Chat Administration" menu. It's also told to you when you use the Start the Melange chat service option.
After starting the chat service, try logging in as Prof. Einstein. Enter his "Introduction to Physics" course, click on the Chat button on the course's Main Menu, then click the Enter Chat button within the module. Type a few messages to convince yourself that chat works for this teacher.
Melange keeps a service log, which is stored as text in the file melange.log within the chat directory of your Mahattan installation. The View/delete Melange service log option allows the system administrator to view or delete that log file:

Click on the link to view the log. Note the Permanently Delete this Log File button at the top. As the system administrator, you should come here at least once a week to review and then delete this log file:

The log contains information about each login to the chat system. If your Manhattan server is actively used, it is not uncommon to see a number of entries that read "User so-and-so on socket so-and-so crashed!". While these log entries seem ominous, they really are telling you that that user simply closed his browser window, rather than properly logging out of chat properly by clicking the Logoff button.
The second item on the Melange Chat Administration menu allows the administrator to stop the Melange service:

When you click the link, a "kill" signal is sent to the Melange service, telling it to shutdown. As described on the page, you can then try to enter the chat to make sure the service has been stopped (in our experience, it always works!):

The Melange chat service is different from the other programs that make up Manhattan because it runs as a "daemon" or background process on your server. Once you start the chat service, it continues to run for days, weeks or months (or years?) handling messages typed in by students and teachers on your server. While in our experience the service has been highly reliable, it's a good idea to periodically stop and restart the service, and to delete the system log. Depending on how heavily your installation is used, I would recommend doing the following "every now and then".
Enter the chat to make sure it's working. While you're there, see who's logged on by clicking on the Who is logged on? button. We've noticed that sometimes Melange will incorrectly report that someone is on, who is not. (You can use Who's on Manhattan? to help you determine who's really on chat.) This is all the more reason to give Melange a fresh start.
Once you're sure you won't be ruining someone else's chat, stop the chat service.
Review the chat service log. You can use your browser to print or save a copy of the file if you wish. As mentioned earlier, entries like "user so-and-so crashed!" generally mean that the user has simply closed his browser window instead of exiting the chat program nicely. Once you've reviewed (and optionally saved) the log, delete it.
Start the chat service again. Enter the chat to see that it's working, and take a second peek at the service log. You've just given Melange a fresh start!
Go ahead and play with chat. The full end-user documentation exists as its own chapter in Manhattan's Teacher's Reference. As the system administrator, you'll want to make sure that chat is available both on your intranet, and from off-campus. Check the port number assigned to Melange in your custom.h file used to compile Manhattan, and your firewall settings.
We didn't tell you about the item on the Melange Chat Administration menu that allows you to set Change the Melange Admin Password. Try setting the password. Then shut down and restart the chat service so the new password takes effect. Next, try the following:
Enter the chat.
In the message text box, type /admin login your-password and hit Enter. You are now logged in as the chat administrator.
Now type in the message /admin help for a list of things the administrator can do, but READ THE FOLLOWING:
![]() |
Manhattan uses a modified version of Melange. Some of these administrator commands either have not been tested, are simply a BAD IDEA for a classroom chat, or might even break your Manhattan/Melange chat installation. Try them only on a test installation of Manhattan! |
Despite the above warning, the one admin command that will work is /admin shutdown your-password, which provides another way to cleanly shutdown the Melange service. Try that now.
When you're done, change the admin password back to a blank (delete what you've typed in as a password) and re-start the melange service. With a blank password, the admin features within Melange are disabled, which is a good thing.