wibble
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index f403320..db26a3d 100644 (file)
--- a/send.c
+++ b/send.c
@@ -990,14 +990,14 @@ address_t *mutt_default_from (void)
 
   if (MAlias.from)
     adr = address_dup(MAlias.from);
-  else if (MCore.use_domain) {
+  else if (mod_core.use_domain) {
     const char *fqdn = mutt_fqdn (1);
     adr = address_new();
-    adr->mailbox = p_new(char, m_strlen(MCore.username) + m_strlen(fqdn) + 2);
-    sprintf(adr->mailbox, "%s@%s", NONULL(MCore.username), NONULL(fqdn));
+    adr->mailbox = p_new(char, m_strlen(mod_core.username) + m_strlen(fqdn) + 2);
+    sprintf(adr->mailbox, "%s@%s", NONULL(mod_core.username), NONULL(fqdn));
   } else {
     adr = address_new ();
-    adr->mailbox = m_strdup(NONULL(MCore.username));
+    adr->mailbox = m_strdup(NONULL(mod_core.username));
   }
 
   return (adr);
@@ -1010,7 +1010,7 @@ static int send_message (HEADER * msg)
   int i;
 
   /* Write out the message in MIME form. */
-  tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL);
+  tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(mod_core.tmpdir), NULL);
   if (!tempfp)
     return -1;
 
@@ -1208,7 +1208,7 @@ int ci_send_message (int flags, /* send mode */
 
     if (!tempfile) {
       char buffer[_POSIX_PATH_MAX];
-      tempfp = m_tempfile(buffer, sizeof(buffer), NONULL(MCore.tmpdir), NULL);
+      tempfp = m_tempfile(buffer, sizeof(buffer), NONULL(mod_core.tmpdir), NULL);
       msg->content->filename = m_strdup(buffer);
     } else {
       tempfp = safe_fopen(tempfile, "a+");
@@ -1327,16 +1327,15 @@ int ci_send_message (int flags, /* send mode */
      * can take effect.
      */
 
-    if (option (OPTCRYPTAUTOSIGN))
+    if (mod_crypt.autosign)
       msg->security |= SIGN;
-    if (option (OPTCRYPTAUTOENCRYPT))
+    if (mod_crypt.autoencrypt)
       msg->security |= ENCRYPT;
-    if (option (OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
+    if (mod_crypt.replyencrypt && cur && (cur->security & ENCRYPT))
       msg->security |= ENCRYPT;
-    if (option (OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
+    if (mod_crypt.replysign && cur && (cur->security & SIGN))
       msg->security |= SIGN;
-    if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur
-        && (cur->security & ENCRYPT))
+    if (mod_crypt.replysignencrypted && cur && (cur->security & ENCRYPT))
       msg->security |= SIGN;
 
     if (msg->security) {
@@ -1350,10 +1349,9 @@ int ci_send_message (int flags, /* send mode */
        * disable individual mechanisms at run-time?
        */
       if (cur) {
-        if (option (OPTCRYPTAUTOPGP) && (cur->security & APPLICATION_PGP))
+        if (mod_crypt.autopgp && (cur->security & APPLICATION_PGP))
           msg->security |= APPLICATION_PGP;
-        else if (option (OPTCRYPTAUTOSMIME)
-                 && (cur->security & APPLICATION_SMIME))
+        else if (mod_crypt.autosmime && (cur->security & APPLICATION_SMIME))
           msg->security |= APPLICATION_SMIME;
       }
 
@@ -1362,11 +1360,11 @@ int ci_send_message (int flags, /* send mode */
        * for the decision. 
        */
       if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP))) {
-        if (option (OPTCRYPTAUTOSMIME) && option (OPTSMIMEISDEFAULT))
+        if (mod_crypt.autosmime && mod_crypt.smime_is_default)
           msg->security |= APPLICATION_SMIME;
-        else if (option (OPTCRYPTAUTOPGP))
+        else if (mod_crypt.autopgp)
           msg->security |= APPLICATION_PGP;
-        else if (option (OPTCRYPTAUTOSMIME))
+        else if (mod_crypt.autosmime)
           msg->security |= APPLICATION_SMIME;
       }
     }