|
libircbot
library providing a framework for implementing an IRC bot
|
An IRC server. More...
#include <ircbot/ircserver.h>
Public Member Functions | |
| IrcServer * | IrcServer_create (const char *id, const char *remotehost, int port, const char *nick, const char *user, const char *realname) |
| Create a new IRC server to connect to. More... | |
| void | IrcServer_enableTls (IrcServer *self, const char *certfile, const char *keyfile) |
| Enable TLS with optional client certificate. More... | |
| const char * | IrcServer_id (const IrcServer *self) |
| The identifier of the server. More... | |
| const char * | IrcServer_name (const IrcServer *self) |
| The name of the server. More... | |
| const char * | IrcServer_nick (const IrcServer *self) |
| The nick currently used on the server. More... | |
| const IBHashTable * | IrcServer_channels (const IrcServer *self) |
| A hash table of all currently requested or joined channels. More... | |
| void | IrcServer_join (IrcServer *self, const char *channel) |
| Request to join a channel. More... | |
| void | IrcServer_part (IrcServer *self, const char *channel) |
| Request to leave a channel. More... | |
| void | IrcServer_destroy (IrcServer *self) |
| IrcServer destructor. More... | |
An IRC server.
| const IBHashTable * IrcServer_channels | ( | const IrcServer * | self | ) |
A hash table of all currently requested or joined channels.
The keys are the channel names, the objects are IrcChannel objects.
| self | the IrcServer |
| IrcServer * IrcServer_create | ( | const char * | id, |
| const char * | remotehost, | ||
| int | port, | ||
| const char * | nick, | ||
| const char * | user, | ||
| const char * | realname | ||
| ) |
Create a new IRC server to connect to.
| id | an identifier for the server, e.g. the name of the IRC network |
| remotehost | host name or IP address to connect to |
| port | port number to connect to (typically 6667) |
| nick | nickname to use on that server |
| user | username to use, NULL to derive from local account |
| realname | real name to use, NULL to derive from local account |
| void IrcServer_enableTls | ( | IrcServer * | self, |
| const char * | certfile, | ||
| const char * | keyfile | ||
| ) |
Enable TLS with optional client certificate.
This function must be called before the IrcServer object is passed to the IrcBot. It's only available when libircbot was built with TLS support.
| self | the IrcServer |
| certfile | client certificate file, NULL for none |
| keyfile | client certificate key file, NULL for none |
| const char * IrcServer_id | ( | const IrcServer * | self | ) |
| void IrcServer_join | ( | IrcServer * | self, |
| const char * | channel | ||
| ) |
Request to join a channel.
Do NOT use this function from bot event handlers!
| self | the IrcServer |
| channel | the name of the channel to join |
| const char * IrcServer_name | ( | const IrcServer * | self | ) |
The name of the server.
This is either the name advertised by the server itself, or as long as this isn't known yet, the remote host name given in IrcServer_create().
| self | the IrcServer |
| const char * IrcServer_nick | ( | const IrcServer * | self | ) |
| void IrcServer_part | ( | IrcServer * | self, |
| const char * | channel | ||
| ) |
Request to leave a channel.
Do NOT use this function from bot event handlers!
| self | the IrcServer |
| channel | the name of the channel to leave |