+/**
+ * \brief save sieve config
+ */
+void save_sieve(void) {
+ int bigaction;
+ char script_names[MAX_SCRIPTS][64];
+ int num_scripts = 0;
+ int active_script = (-1);
+ int i;
+ char this_name[64];
+ char buf[256];
+
+ if (strlen(bstr("save_button")) == 0) {
+ strcpy(WC->ImportantMessage,
+ _("Cancelled. Changes were not saved."));
+ display_main_menu();
+ return;
+ }
+
+ serv_puts("MSIV listscripts");
+ serv_getln(buf, sizeof(buf));
+ if (buf[0] == '1') while (serv_getln(buf, sizeof(buf)), strcmp(buf, "000")) {
+ if (num_scripts < MAX_SCRIPTS) {
+ extract_token(script_names[num_scripts], buf, 0, '|', 64);
+ if (extract_int(buf, 1) > 0) {
+ active_script = num_scripts;
+ }
+ ++num_scripts;
+ }
+ }
+
+ bigaction = atoi(bstr("bigaction"));
+
+ if (bigaction == 0) {
+ lprintf(9, "MSIV setactive||");
+ }
+
+ else if (bigaction == 2) {
+ lprintf(9, "MSIV setactive|%s|", bstr("active_script"));
+ }
+
+ if (num_scripts > 0) {
+ for (i=0; i<num_scripts; ++i) {
+ lprintf(9, "MSIV putscript|%s|", script_names[i]);
+ snprintf(this_name, sizeof this_name, "text_%s", script_names[i]);
+ lprintf(9, "%s\n", bstr(this_name));
+ lprintf(9, "000\n");
+ }
+ }
+
+
+
+
+
+ strcpy(WC->ImportantMessage, "FIXME");
+ display_main_menu();
+ return;
+}