src/irc_log.h
branchmodules
changeset 55 6f7f6ae729d0
parent 26 aec062af155d
child 56 942370000450
equal deleted inserted replaced
54:9f74e924b01a 55:6f7f6ae729d0
     2 #define IRC_LOG_H
     2 #define IRC_LOG_H
     3 
     3 
     4 /**
     4 /**
     5  * @file
     5  * @file
     6  *
     6  *
     7  * Logging IRC events to an SQL database
     7  * Module for logging IRC events to an SQL database
     8  */
     8  */
       
     9 #include "module.h"
     9 #include "error.h"
    10 #include "error.h"
    10 #include "irc_chan.h"
    11 #include "irc_chan.h"
    11 #include <event2/event.h>
    12 #include <event2/event.h>
    12 
    13 
    13 /**
    14 /**
    14  * Configuration state for irc_log
    15  * Initialize the irc_log module to use the given configuration
    15  */
    16  */
    16 struct irc_log_info {
    17 void* irc_log_init (struct modules *modules, struct error_info *err);
    17     /** Database connection string */
       
    18     const char *db_info;
       
    19 
       
    20     /** The channel to log */
       
    21     struct irc_chan *channel;
       
    22 };
       
    23 
    18 
    24 /**
    19 /**
    25  * Initialize the global irc_log module to use the given configuration
    20  * Set one of the config options:
    26  *
    21  *
    27  * XXX: db_info is still unused if not specified
    22  *  db_info     - the database connection string
       
    23  *  channel     - the network:channel to log
    28  */
    24  */
    29 err_t irc_log_init (struct event_base *ev_base, const struct irc_log_info *info);
    25 err_t irc_log_conf (struct module *module, const char *name, char *value);
    30 
    26 
    31 #endif
    27 #endif