- /* Take a spin through the user's personal address book */
- if (getroom(&CC->room, USERCONFIGROOM) == 0) {
-
- u->config_msgnum = (-1);
- strcpy(u->config_roomname, CC->room.QRname);
- CtdlForEachMessage(MSGS_LAST, 1, NULL, SIEVECONFIG, NULL,
- get_sieve_config_backend, (void *)u );
-
- }
-
- if (strcmp(CC->room.QRname, hold_rm)) {
- getroom(&CC->room, hold_rm); /* return to saved room */
- }
-}
-
-void msiv_store(struct sdm_userdata *u, int yes_write_to_disk) {
- rewrite_ctdl_sieve_config(u, yes_write_to_disk);
-}
-
-
-/*
- * Select the active script.
- * (Set script_name to an empty string to disable all scripts)
- *
- * Returns 0 on success or nonzero for error.
- */
-int msiv_setactive(struct sdm_userdata *u, char *script_name) {
- int ok = 0;
- struct sdm_script *s;
-
- /* First see if the supplied value is ok */
-
- if (IsEmptyStr(script_name)) {
- ok = 1;
- }
- else {
- for (s=u->first_script; s!=NULL; s=s->next) {
- if (!strcasecmp(s->script_name, script_name)) {
- ok = 1;
- }
- }
- }
-
- if (!ok) return(-1);
-
- /* Now set the active script */
- for (s=u->first_script; s!=NULL; s=s->next) {
- if (!strcasecmp(s->script_name, script_name)) {
- s->script_active = 1;
- }
- else {
- s->script_active = 0;
- }
- }
-
- return(0);
-}
-
-
-/*
- * Fetch a script by name.
- *
- * Returns NULL if the named script was not found, or a pointer to the script
- * if it was found. NOTE: the caller does *not* own the memory returned by
- * this function. Copy it if you need to keep it.
- */
-char *msiv_getscript(struct sdm_userdata *u, char *script_name) {
- struct sdm_script *s;