src/irc_log.h
author Tero Marttila <terom@fixme.fi>
Thu, 12 Mar 2009 18:35:05 +0200
changeset 38 0c2e0cb46c3a
parent 26 aec062af155d
child 55 6f7f6ae729d0
permissions -rw-r--r--
implement irc_chan_callbacks, and add on_msg
#ifndef IRC_LOG_H
#define IRC_LOG_H

/**
 * @file
 *
 * Logging IRC events to an SQL database
 */
#include "error.h"
#include "irc_chan.h"
#include <event2/event.h>

/**
 * Configuration state for irc_log
 */
struct irc_log_info {
    /** Database connection string */
    const char *db_info;

    /** The channel to log */
    struct irc_chan *channel;
};

/**
 * Initialize the global irc_log module to use the given configuration
 *
 * XXX: db_info is still unused if not specified
 */
err_t irc_log_init (struct event_base *ev_base, const struct irc_log_info *info);

#endif