mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 08:26:21 +00:00
Added /inpblock command
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user