mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-26 19:22:22 -05:00
Save chanopt after any changes
This commit is contained in:
parent
cf505b850b
commit
0e420fbee8
@ -128,6 +128,7 @@ chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
if (newval != -1) /* set new value */
|
if (newval != -1) /* set new value */
|
||||||
{
|
{
|
||||||
*(guint8 *)G_STRUCT_MEMBER_P(sess, chanopt[i].offset) = newval;
|
*(guint8 *)G_STRUCT_MEMBER_P(sess, chanopt[i].offset) = newval;
|
||||||
|
chanopt_changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quiet) /* print value */
|
if (!quiet) /* print value */
|
||||||
@ -436,11 +437,9 @@ cont:
|
|||||||
|
|
||||||
close (fh);
|
close (fh);
|
||||||
|
|
||||||
/* we're quiting, no need to free */
|
g_slist_free (chanopt_list);
|
||||||
|
|
||||||
/*g_slist_free (chanopt_list);
|
|
||||||
chanopt_list = NULL;
|
chanopt_list = NULL;
|
||||||
|
|
||||||
chanopt_open = FALSE;
|
chanopt_open = FALSE;
|
||||||
chanopt_changed = FALSE;*/
|
chanopt_changed = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -575,8 +575,13 @@ cmd_unban (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
static int
|
static int
|
||||||
cmd_chanopt (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
cmd_chanopt (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* chanopt.c */
|
/* chanopt.c */
|
||||||
return chanopt_command (sess, tbuf, word, word_eol);
|
ret = chanopt_command (sess, tbuf, word, word_eol);
|
||||||
|
chanopt_save_all ();
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "../common/url.h"
|
#include "../common/url.h"
|
||||||
#include "../common/util.h"
|
#include "../common/util.h"
|
||||||
#include "../common/text.h"
|
#include "../common/text.h"
|
||||||
|
#include "../common/chanopt.h"
|
||||||
|
|
||||||
#include "fe-gtk.h"
|
#include "fe-gtk.h"
|
||||||
#include "banlist.h"
|
#include "banlist.h"
|
||||||
@ -1537,6 +1538,9 @@ mg_set_guint8 (GtkCheckMenuItem *item, guint8 *setting)
|
|||||||
/* has the logging setting changed? */
|
/* has the logging setting changed? */
|
||||||
if (logging != sess->text_logging)
|
if (logging != sess->text_logging)
|
||||||
log_open_or_close (sess);
|
log_open_or_close (sess);
|
||||||
|
|
||||||
|
chanopt_save (sess);
|
||||||
|
chanopt_save_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user