Microsoft Chat IRCClient

Microsoft Script Chat


Microsoft® Script Chat is a Java™ applet that provides the Web designer with a variety of methods and properties enabling creation and management of chat rooms. With this applet, new chat rooms can be created with the ability to dynamically push URLs or images to the chat window. HTML tags can also be embedded within chat messages. The appearance of the user interface is completely under the control of the developer.

arrowb.gifSetting Up Microsoft Script Chat

arrowb.gifPublic Script Chat Methods

arrowb.gifPublic IRCListener Methods

arrowb.gifSample pages

Setting Up Microsoft Script Chat

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

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

  2. After you set up the Web server and chat server, unzip the script1.exe in the \script1 folder of your Chat SDK directory into the \samples\script subdirectory.

  3. Copy all the contents of the \samples\script directory to a directory on your Web/chat server.

Public Script Chat 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
banUser(String nick, String user, String host, String room, boolean cond) void Ban the user with the specified nick from joining the specified room
connect(String host, int port, String localnick, String password) void Attempts to connect to the specified host, with the specified nickname and optional password.
disconnect() void Disconnects from the chat server and suspends all threads.
extractAddress(String id) String Extracts the address of the user's computer from the user id.
extractNickname(String id) String Extracts the nickname of the user from the user id.
extractUserName(String id) String Extracts the user's name from the user id.
getListener() IRCListener Returns the IRCListener object registered with this client.
getLocalNickname() String Returns the local user's nickname.
getLocalRoom() String Returns the room which you are currently in, or the first room you entered if in multiple rooms.
getLocalRooms(String delim) String Returns a string of all rooms you are currently in, delimited by the delim argument.
getTopic(String roomname) String Returns the topic of the room or null if unknown.
getVersion() String Returns the applet version.
isConnected() boolean Returns true if connected to a server, or false if not.
isHost(String user, String room) boolean Returns true if the user is a host in the specified room, or false if not.
isMember(String user, String room) boolean Returns true if the user is a member of specified room, or false otherwise.
isModerated(String roomname) boolean Returns true if the specified room is moderated, or false otherwise.
isSpeaker(String user, String room) boolean Returns true if the user is a speaker, or host, in the specified room, or false if not.
joinRoom(String room, String password) void Requests to join a room.
kickMember(String room, String member, String reason) void Attempts to kick another member out of a specified room.
partAllRooms() void Departs user from all rooms.
partRoom(String room) void Departs a specified room.
requestMemberList(String room) void Requests a room member list.
requestRoomList() void Requests a list of all rooms.
requestUserList() void Requests a list of all users.
sendInvitation(String nick, String room) void Invite someone to join a room.
sendMessage(String target, String message void Attempts to send a message to a room or user.
sendServer(String raw) void Sends a message directly to the server without any processing.
setHost(String user, String room, boolean host) boolean If host equals true then promotes user to host in room, otherwise demotes user.
setListener(IRCListener listener) void Sets the IRCListener object which will listen for events from this client.
setLocalNickname(String nick) void Attempts to set the local user's nickname.
setModerated(String room, boolean mod) boolean If mod equals true then sets room to moderated, otherwise removes moderation.
setSpeaker(String user, String room, boolean speaker) void If speaker equals true then promotes user to speaker in (moderated) room, otherwise demotes user.
setTopic(String room, String topic) void Sets the topic for a room.

Public IRCListener Methods

Method Returns    Description
connected(String server, String[] motd) void Notification of a successful connection.
disconnected(String server) void Notification that local user has been disconnected for host.
invalidNick(String badnick) void Notification that an attempt to setNickname has failed. Try again.
invitationArrived(String source, String room) void Notification that an invitation to join a room has arrived from source.
memberJoined(String room, String nick, String identity) void Notification that a new member has joined the specified room.
memberKicked(String room, String nick, String kicker, String reason) void Notification that a host has kicked a member from the room.
memberList(String room, String[] hosts, String[] speakers, String[] observers) void Delivers the requested member list sorted by name and separated into hosts, speakers, and observers.
memberParted(String room, String nick) void Notification that a member has departed from the specified room.
messageArrived(String source, String target, String message, String identity) void Notification that a message has arrived.
nickChanged(String oldnick, String newnick, String identity) void Notification that a member has changed their nickname.
roomList(String[] rooms, String[] count, String[] topics) void Delivers the requested room listed sorted by room name.
roomStatusChanged(String room, boolean moderated, String topic) void Notification that either the moderation status or the room topic has changed.
userList(String[] nicks, String[] users, String[] rooms, String[] hosts) void Delivers the requested user list sorted by name.