Microsoft Chat 1.0j

Microsoft Chat 1.0j


Microsoft® Chat 1.0j is a Java™ applet that provides the Web designer with a simple, customizable user interface and programmability for the applet. With this applet, the page can be coded to join or create an existing room on the chat server with a nickname selected by the user. Other options include the ability to customize or hide the toolbar, and hide the member list and/or input field. The applet provides the Web designer with a default user interface that includes dialog boxes to view the room list, create and join a room, change the nickname, change fonts, and connect to the server. The default user interface is customizable by the Web designer.

Microsoft Chat 1.0j does not provide event notification and does not display the user list on the chat server.

arrowb.gifSetting Up Microsoft Chat 1.0j

arrowb.gifOptional Parameters

arrowb.gifPublic Applet Methods

Setting Up Microsoft Chat 1.0j

The following steps show how to set up Microsoft Chat 1.0j to work with your chat server:

  1. Set up a Web server and IRC chat server on the same computer to use the Chat applet. Chat 1.0 j should work with any IRC chat server but has been tested mainly with the IRC chat server available in Exchanage Server 5.5 from http://www.microsoft.com/exchange.

  2. After you set up the Web server and chat server, copy Mschat1j.exe in the \chat1j directory to a directory on your Web/chat server.

  3. Execute Mschat1j.exe.

Optional Parameters

The following is a list of optional parameters that can be applied to a Chat applet embedded on a Web page by using the <PARAM> tag.

Name Value(s) Default Description
port [number] 6667 Specifies the port on which the chat server is running, usually 6667.
nickname [user nickname] "Anonymous" Specifies the default name, used for autoconnect.
room [roomname]  - Specifies the default room to join.
toolbar true | false true Determines if the toolbar should be visible.
memberlist true | false true Determines if the member list should be visible.
observer true | false false Determines if the user can participate in a conversation.
banner [imagename]  - Specifies a welcome image that should be displayed when the applet loads.
autoconnect true | false false Determines if the applet will automatically connect when loaded. If true, room and nickname must be specified.
autodisconnect    true | false false Determines if the applet will automatically disconnect when the page is exited.
motd true | false true Determines if the applet will display the Message of the Day after connecting.
stats true | false true Determines if the applet will display server statistics after connecting.
id [unique string]    "null" Indicates that unique identifiers must be supplied if multiple chat applets will be on the same page.
font fontname, style, size    Helvetica, 0, 11    Helvetica | Dialog | TimesRoman | Courier, 0(plain), 1(bold), 2(italic), 3(bold + italic), 8 - 20
bgcolor ffffff c0c0c0 Specifies the color, using hexadecimal notation same as in the HTML body tag.
relay true | false false Enables message source forging.
send nick1[,nick2...] null Dictates, if present, that all messages sent by a user to a room will be whispered to the specified nicknames instead.
push true | false false Enables any host in the room to push java chat users in the same room to web other pages. Also enables display of images inside the chat text area.

Notes on relay and send parameters

These parameters are most often used to facilitate moderated chat rooms, such as celebrity chat events. In such chat rooms, a moderator will filter through messages from fans. With the send parameter set to the moderator's nickname, all public messages will actually be whispered to the moderator. (Whispered messages will still function normally.) The moderator may then filter the messages and publicly forward those that are appropriate to the entire room using the relay parameter.

The relay parameter facilitates message source forging, which enables users to send messages such that it appears to the recipient that the message came from a different source. For example, a message string sent from "moderator", such as "joe says: What's your next movie?", will appear to the recipient as if the string after the colon ("What's your next movie?") was actually sent from joe.

Notes on push parameter

The push parameter enables a host to push chat users to other web pages. This is accomplished by sending the command "push relativeURL [targetFrame]"

Examples

push /images/picture.gif
push http://www.news.com _top

All urls are relative to the html page containing the applet.

By setting the frame to _self, hosts can display gif or jpg images within the chat text area itself.

Example

push /images/picture.gif _self

Embedding the applet in a web page

HTML code for embedding an applet in a page. This sample shows the main user interface for Chat 1.0j. The user can use the toolbar to choose a nickname, connect to the chat server and join or create a chat room to chat in.

<applet code=MSChat archive=mschat.jar name=Chat width=500 height=400>
    <param name=cabbase value=mschat.cab>
    <param name=room value=#newbies>
    <param name=port value=6667>
</applet>

Public Applet Methods

The following methods are exposed by the Chat applet. They can be called from any script language supported by the client browser.

Method Returns    Description
connect(string nickname) void Connects to the server with the specified nickname.
connect(string nickname, string room) void Connects to the server with the specified nickname and joins the specified room, overriding any present room parameter.
disconnect() void User leaves all rooms and closes the connection with the server.
getNick() String Returns the user nickname, or null if the user hasn't yet logged on.
getRoom() String Returns the name of the room the user is currently in, or null if the user hasn't yet logged on.
join(string room, string password) void Leaves any current room, joins a specified room. Password is ignored if null or "".
showRoomList() void Displays the room list window.
showEnterRoomDialog() void Displays the dialog box that prompts user to enter a chat room.
showFontDialog() void Displays the dialog box that prompts user to change the current font.
showConnectDialog() void Displays the dialog box that prompts user to connect to a server.
showAboutDialog() void Displays the Microsoft Chat dialog box.

Example

The following example calls the connect method.

<FORM NAME="form1">
<INPUT TYPE="button" VALUE="Connect" onClick="document.Chat.connect(document.form1.nickname.value, document.form1.room.value)">
</FORM>

<applet code=MSChat archive=mschat.jar 
                name=Chat width=500 height=400>
    <param name=cabbase value=mschat.cab>
    <param name=room value=#newbies>
    <param name=port value=6667>
</applet>

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.