ActiveIRC Documentation

Welcome to the documentation for the ActiveIRC ActiveX component. This component allows any ActiveX enabled application with scripting abilities to connect to IRC servers, join and leave channels, send and receive messages to and from channels and other IRC users, and even find out certain modes for the IRC channels.

The control features several methods for interacting with the IRC server, as well as several properties representing the user it is meant to represent, and events which the application can use to receive messages sent from the IRC server. The control also keeps track of all channels it's in, users in them, and useful mode information for these channels and users. Also available is the ability to send raw commands to the IRC server to implement any features not covered by the control itself.


Installation Copyright information Bug reports and feature requests


Methods

Properties

Events


Installation

To install the ActiveIRC control, simply execute the iactiveirc.exe program. This will copy the ActiveX DLL into the correct subdirectory, and install it into the registry. To call the executable from your own install program, use the /s switch to make it silent, so your program would execute iactiveirc.exe /s.


Copyright Information

ActiveIRC is Copyright (C) 1999-2002 Colin Munro. No responsibility will be taken by Colin Munro for any problems caused by using this software. If there are any bugs, please contact me and they will be looked at as soon as possible. I cannot make any guarantees about bugs being fixed, although I will try my best.

Shareware

ActiveIRC is a shareware common control. The shareware version will stop functioning after 200 messages are sent to or received from the server. To register, please visit http://www.mice-software.com. The cost to register is 10 UK pounds Sterling. (Or 20 US dollars). You may also register by directly going to our online ordering site.

Trademarks

ActiveX and Microsoft are either registered trademarks or trademarks of Microsoft Corporation in certain countries.


Bugs and Feature requests

If there is another feature you think would be good for this control, or you find a bug, please contact me. Features currently being considered for addition to the control are:

Currently known bugs are:

Past bugs and updates that are now hopefully fixed. Please note that this list is no longer mainteined:

If you have any feature requests or you've found any bugs, or you'd like to find out how current features are being implemented, contact me at bugs@mice-software.com


Methods

Connect
boolean Connect(void)

This function tells the object to connect to the IRC server defined by the properties regarding nick, server, port, email address, and ident. The function returns immediatly, you must find out whether the IRC server is connected by checking the IsConnected property, or waiting for the IRCReady event. If this command returns false, there was a problem.

Disconnect

void Disconnect(void)

This function disconnects from the IRC server, if connected. It uses the quit message stored in the property quitmessage. If this is not called before your application ends, it is called automatically and the IRC server still gets the quit message.

Join

boolean Join(string channel)

This function joins an IRC channel, which you will start receiving messages from. The ActiveIRC control will also record information on the channel, and add it to an array which you can query to find out information on the channel.

Leave

boolean Leave(string channel,string message)

This function leaves an IRC channel that it is in. If not, it returns false, but if you are in the channel and the message is supplied, you leave with that message displayed.

Say

boolean Say(string channel,string text)

This function sends a message to an IRC channel for other users to receive. The channel can also be another user, in which case a private message is sent.

Action

boolean Action(string channel,string text)

This function makes you do an action, similar to a message except it appears as "nick does something" where "does something" would be the text you specify.

Notice

boolean Notice(string channel,string text)

This sends a notice to the specified channel or user. This is similar to the Say command.

Raw

boolean Raw(string command)

This sends a command straight to the IRC server, without being processed by the ActiveIRC control. Use this to use functions not implemented yet by the control, or just to do things without affecting the controls internal records.

CTCPRequest

boolean CTCPRequest(string nick,string ctcp,string info)

This requests CTCP Information from another user, specified in nick. The CTCP command is put in CTCP, and the most common CTCP requests are :

VERSION This will cause the other users computer to return information on what version of the IRC software they are using is running
PING This finds out how long it takes for their computer to respond over the IRC network
FINGER This returns information on the user
TIME This returns the local time for the user

The info parameter can be used to send some information along with the command. Some other less common CTCP requests need this. The PING command also should have this as the number of seconds since 1st January 1970, which will be returned in the CTCP reply from the other user. You can then subtract this from the current number of seconds since then, and you know how long in seconds it's taking for the other user to reply to you.

CTCPReply

boolean CTCPReply(string nick,string ctcp,string reply)

This replies to a CTCP request that you receive from the CTCPRequest event. The VERSION, PING, FINGER and TIME requests are processed internally by the control.

GetChannelCount

long GetChannelCount(void)

This returns the number of channels the control currently knows it's in. If you've entered a channel using the Raw function, the internal records kept by the control won't know.

GetChannelName

string GetChannelName(long channel)

This returns the name of the channel at the array index channel. The index is zero based.

GetChannelMode

boolean GetChannelMode(string channel,string mode)

This returns the state of the specified mode. In the string mode, a single character should be put, containing the IRC mode letter for the state of the mode you want to know about. Currently understood modes are:

i Invite only
m Moderated
n No external messages
t Only operators can set the topic

GetUserCount

long GetUserCount(long channel)

This returns the number of users currently in the channel at the specified index. The index is zero based.

GetUserName

string GetUserName(long channel,long user)

This returns the name of the user in the channel specified by the channel index and the user index. Both indexes are zero based.

GetUserMode

boolean GetUserMode(string channel,string user,string mode)

Similar to the GetChannelMode method, this returns the state of a mode for the user. The mode parameter must be a single character, indicating the mode being queried. Mode characters currently understood are:

o User has operator mode in this channel
v User has voice mode in this channel. This allows them to speak in moderated channels.

AboutBox

void AboutBox(void)

This displays the About dialog box for the control, showing version and copyright information.


Properties

server

This string stores the name or address of the IRC server (e.g. irc.dal.net)

port

This short integer stores the port number on the IRC server to use (normally 6667)

nick

This string contains the nick of the control when it's connected to the server

ident

This is normally 'localhost' for reasons I've not yet investigated! This is only used when you Connect

fullname

This is the full name of the IRC user that should appear when somebody does a WHOIS on them. This is only used when you Connect

email

This is the email address of the IRC user to tell the IRC server when it's logging in.

quitmessage

This is the message used when you call Disconnect to leave the IRC server.

IsConnected

This only makes sense after you've called Connect, it goes true when the server is ready for commands. It's also read-only.


Events

ChannelNewTopic

void ChannelNewTopic(string channel,string topic,string user)

This event is fired when a channel that the control is currently in is given a new topic. The new topic is given by topic, and the user who set this new topic in the specified channel is given by user.

Console

void Console(string line)

This event is fired when the control recieves a message, sends a message, or any other information is sent to this as if it were a terminal. Useful for debugging.

CTCPReply

void CTCPReply(string user,string ctcp,string reply)

This event is fired when a CTCP reply is received from another user, after you've called the CTCPRequest method to request a reply.

CTCPRequest

void CTCPRequest(string user,string ctcp,string msg)

This event is fired when a CTCP request is received from the user specified in the parameter user. The CTCP command is stored in the parameter ctcp, and any additional info is stored in msg. The CTCP commands VERSION, PING, TIME and FINGER are all processed by the control, only custom CTCP commands need to be added to this.

IRCReady

void IRCReady(void)

This is fired when IsConnected goes true, to indicate that the IRC server is ready to receive commands. You can enter channels in this, say welcome messages, etc.

Message

void Message(string channel,string user,string text)

This is called when a message is received from a channel. The channel, user who sent the message to the channel and the actual message are supplied as parameters.

Notice

void Notice(string user,string text)

This is called when a notice is received.

PrivateMessage

void PrivateMessage(string user,string text)

This event occurs when a user sends a message to the control privately. The user and actual message are supplied as parameters.

UserAction

void UserAction(string channel,string user,string text)

This event is when someone does an action. It provides the channel, the user and the message.

UserChangeNick

void UserChangeNick(string from,string to)

This event is when someone changes their nickname on IRC. Every channel has the new nick instead of the old one listed.

UserJoins

void UserJoins(string channel,string user)

This is called when a new user enters the channel.

UserKicked

void UserKicked(string channel,string user,string msg)

This is called when a user is kicked from the channel. The msg is the message the operator sent when kicking the person.

UserParts

void UserParts(string channel,string user,string message)

This is called when a user leaves the channel of their own accord. The message is the message they leave when leaving.

UserQuits

void UserQuits(string user,string message)

This is called when a user disconnects from IRC. They can leave with a message.


ActiveIRC Documentation
Version 1.07b
Copyright © 1999-2002 Colin Munro
http://www.mice-software.com