
IRC Connection class. More...
Derived from: | None |
Derived by: | None |
Group: | Internet Relay Chat (Network) |
#include <ClanLib/network.h>
Class Members:
Construction: | |
Constructs a CL_IRCConnection and connects a server. |
| |
Returns our current nick name. | |
Returns the username passed to send_user. | |
Returns hostname passed to send_user. | |
Returns server name passed to send_user. | |
Returns the real name passed to send_user. |
| |
Send command to IRC server. | |
Send password. | |
Send nick. | |
Send user login/identify command. | |
Send operator login command. | |
Send quit command. | |
Send join channel command. | |
Send part channel command. | |
Send set mode command. | |
Set/Get topic on channel. | |
List nicks on channel(s). | |
Send list of channels. | |
Send channel join invitation. | |
Send kick command. | |
Send version command. | |
Send statistics command. | |
Send links command. | |
Send time command. | |
Send connect command. | |
Send trace command. | |
Send admin command. | |
Send info command. | |
Send channel message or private message. | |
Send Client To Client Protocol (CTCP) message. | |
Send notice message. | |
Send Client To Client Protocol (CTCP) notice. | |
Send who command. | |
Send whois command. | |
Send whowas command. | |
Send kill command. | |
Send ping command. | |
Send pong command. | |
Extracts nick part of a fully qualified IRC prefix. | |
Extracts user part of a fully qualified IRC prefix. | |
Extracts address part of a fully qualified IRC prefix. |
| |
sig_socket_error(error_message) | |
sig_command_received(prefix, command, params) | |
sig_unknown_command_received(prefix, command, params) | |
sig_numeric_reply(prefix, code, params) | |
sig_name_reply(self, channel, users) | |
sig_nick(old_nick, new_nick) | |
sig_join(nick, channel) | |
sig_part(nick, channel, reason) | |
sig_mode(prefix, receiver, mode, params) | |
sig_topic(prefix, channel, topic) | |
sig_invite(prefix, nick, channel) | |
sig_kick(prefix, chan, user, comment) | |
sig_privmsg(prefix, receiver, text) | |
sig_notice(prefix, receiver, text) | |
sig_privmsg_ctcp(prefix, receiver, command, data) | |
sig_notice_ctcp(prefix, receiver, command, data) | |
sig_ping(daemon1, daemon2) |
Detailed description:
The CL_IRCConnection class represents a socket connection to an IRC server. Upon construction it will connect to the server+port given and then parse each line written by the IRC server. Each time process_data() is called, the CL_IRCConnection will emit the signals for those commands received.Most IRC networks will expect the connecting IRC client to first send a "nick" command and then a "user" command, as part of the logon process. CL_IRCConnection will not do this, so the general logon procedure looks somewhat like this:
IRC servers will occationally send a "ping" line, which have to be replied with a "pong" command. If this isn't done within some server specific timeout, the IRC network will disconnect the client. CL_IRCConnection will also not do this automatically, so its important you at least hook up the ping slot, to a function looking like this: