2021-03-08 23:16:14 -05:00
|
|
|
#ifndef DATA_H
|
|
|
|
#define DATA_H
|
|
|
|
|
2021-03-31 08:47:18 -04:00
|
|
|
#include <sqlite3.h>
|
|
|
|
#include <libircclient.h>
|
|
|
|
|
2021-03-08 23:16:14 -05:00
|
|
|
/*
|
|
|
|
* We store data in IRC session context.
|
|
|
|
*/
|
2021-03-11 17:23:43 -05:00
|
|
|
struct irc_ctx_t {
|
|
|
|
unsigned short port;
|
2021-03-08 23:16:14 -05:00
|
|
|
char *channel;
|
|
|
|
char *nick;
|
2021-03-11 12:48:15 -05:00
|
|
|
char *server;
|
2021-03-31 08:47:18 -04:00
|
|
|
sqlite3 * db;
|
2021-03-11 17:23:43 -05:00
|
|
|
};
|
2021-03-08 23:16:14 -05:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Params that we give to our threads.
|
|
|
|
*/
|
2021-03-11 17:23:43 -05:00
|
|
|
struct spam_params_t {
|
2021-03-08 23:16:14 -05:00
|
|
|
irc_session_t *session;
|
|
|
|
const char *phrase;
|
|
|
|
const char *channel;
|
2021-03-12 12:41:17 -05:00
|
|
|
float timer;
|
2021-03-11 17:23:43 -05:00
|
|
|
};
|
2021-03-08 23:16:14 -05:00
|
|
|
|
|
|
|
#endif /* DATA_H */
|