* Client connection that has not been authenticated yet.
*/
struct pending_client {
+ /** Connection to the client. */
GIOChannel *connection;
+
+ /** Username the client has sent. */
char *user;
+
+ /** Password the client has sent. */
char *password;
- gint watch_id;
- struct sockaddr *clientname;
- socklen_t clientname_len;
+
+ /** The listener used for this pending client. */
struct irc_listener *listener;
+
+ /** Socks state. */
struct {
struct socks_method *method;
enum state {
} state;
void *method_data;
} socks;
+
+ /** Private data. */
void *private_data;
};
/** IO Channel. */
GIOChannel *outgoing;
+ /** Source id for output watch. */
gint outgoing_id;
+ /** Source id for input watch. */
gint incoming_id;
+
+ /** IConv handle used for outgoing data. */
GIConv outgoing_iconv;
+ /** IConv handle used for incoming data. */
GIConv incoming_iconv;
union {
struct {
+ /** Configuration for TCP/IP server currently connected to. */
struct tcp_server_config *current_server;
+ /** Name of remote server. */
struct sockaddr *remote_name;
+ /** Name of local host used for connection. */
struct sockaddr *local_name;
+ /** Socket name length for remote_name and local_name. */
socklen_t namelen;
+ /** Last reason for disconnect. */
char *last_disconnect_reason;
+ /** Source ID for function that regularly pings the network. */
gint ping_id;
} tcp;
* An IRC network
*/
struct irc_network {
+ /** Global data. */
struct global *global;
/** Configuration. */
*/
struct network_state
{
+ /** Private data to be used by whatever code is using network_state. */
void *userdata;
+ /** Function to use for logging changes and abnormalities. */
void (*log) (enum log_level l,
void *userdata,
const char *msg);
+ /** List of known channels. */
GList *channels;
+ /** List of known nicks. */
GList *nicks;
+ /** Information for the user itself. */
struct network_nick me;
+ /** Network static info. */
struct irc_network_info info;
+ /** Whether or not the user is currently away. */
gboolean is_away;
};
* Plugin description. Required to be defined by all plugins.
*/
struct plugin_ops {
+ /** API version this plugin uses. */
int version;
+ /** Name of the plugin. */
char *name;
+ /** Function that initializes the plugin. */
gboolean (*init) (void);
};
* A plugin.
*/
struct plugin {
+ /** Plugin handle */
GModule *module;
+ /** Plugin private data. */
void *data;
/** Plugin operations */
struct plugin_ops *ops;
* IRC Query done by a client
*/
struct query {
+ /** Command name. */
char *name;
+
+ /** Possible replies */
int replies[20];
+ /** Possible replies that are the last reply to this command. */
int end_replies[20];
+ /** Possible errors. */
int errors[20];
/* Should add this query to the stack. return TRUE if this has
* been done successfully, FALSE otherwise */
+ /** Function for handling the responses. */
int (*handle) (const struct irc_line *, const struct irc_network *n, struct irc_client *c, struct query *);
};
* A replication backend
*/
struct replication_backend {
+ /** Name of the backend, as can be specified in replication=. */
const char *name;
+ /** Replication function. */
void (*replication_fn) (struct irc_client *);
};