Added SQLite persistent storage for friend requests.

This commit is contained in:
Håvard Pettersson 2014-10-04 19:42:30 +02:00
parent b0e91b7b5b
commit 225e576d57
10 changed files with 578 additions and 77 deletions

View file

@ -26,6 +26,7 @@
#include "twc-gui.h"
#include "twc-config.h"
#include "twc-completion.h"
#include "twc-sqlite.h"
#include "twc.h"
@ -42,6 +43,14 @@ weechat_plugin_init(struct t_weechat_plugin *plugin, int argc, char *argv[])
{
weechat_plugin = plugin;
if (twc_sqlite_init() != 0)
{
weechat_printf(NULL,
"%s%s: failed to initialize persistent storage, some "
"data will not be saved",
weechat_prefix("error"), weechat_plugin->name);
}
twc_profile_init();
twc_commands_init();
twc_gui_init();
@ -63,6 +72,8 @@ weechat_plugin_end(struct t_weechat_plugin *plugin)
twc_profile_free_all();
twc_sqlite_end();
return WEECHAT_RC_OK;
}