Added /inpblock command

This commit is contained in:
James Booth
2014-12-21 18:15:29 +00:00
parent 79d4cbe967
commit 13f73a30e7
8 changed files with 55 additions and 1 deletions

View File

@@ -61,6 +61,8 @@
#define PREF_GROUP_ALIAS "alias"
#define PREF_GROUP_OTR "otr"
#define INPBLOCK_DEFAULT 20
static gchar *prefs_loc;
static GKeyFile *prefs;
gint log_maxsize = 0;
@@ -261,6 +263,22 @@ prefs_set_max_log_size(gint value)
_save_prefs();
}
gint prefs_get_inpblock(void)
{
int val = g_key_file_get_integer(prefs, PREF_GROUP_UI, "inpblock", NULL);
if (val == 0) {
return INPBLOCK_DEFAULT;
} else {
return val;
}
}
void prefs_set_inpblock(gint value)
{
g_key_file_set_integer(prefs, PREF_GROUP_UI, "inpblock", value);
_save_prefs();
}
gint
prefs_get_priority(void)
{

View File

@@ -123,6 +123,8 @@ void prefs_set_reconnect(gint value);
gint prefs_get_reconnect(void);
void prefs_set_autoping(gint value);
gint prefs_get_autoping(void);
gint prefs_get_inpblock(void);
void prefs_set_inpblock(gint value);
void prefs_set_occupants_size(gint value);
gint prefs_get_occupants_size(void);