use nntp_data_new and stop hiding the group in the struct, useless win.
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index aa23162..5551bad 100644 (file)
--- a/send.c
+++ b/send.c
@@ -24,7 +24,7 @@
 #include "attach.h"
 
 #ifdef USE_NNTP
-#include <nntp/nntp.h>
+#include "nntp.h"
 #endif
 
 #include "remailer.h"
@@ -1224,10 +1224,8 @@ int ci_send_message (int flags, /* send mode */
 
   if (flags & SENDBATCH) {
     mutt_copy_stream (stdin, tempfp);
-    if (option (OPTHDRS)) {
-      process_user_recips (msg->env);
-      process_user_header (msg->env);
-    }
+    process_user_recips (msg->env);
+    process_user_header (msg->env);
     mutt_expand_aliases_env (msg->env);
   }
   else if (!(flags & (SENDPOSTPONED | SENDRESEND))) {
@@ -1235,8 +1233,7 @@ int ci_send_message (int flags, /* send mode */
         envelope_defaults (msg->env, ctx, cur, flags) == -1)
       goto cleanup;
 
-    if (option (OPTHDRS))
-      process_user_recips (msg->env);
+    process_user_recips (msg->env);
 
     /* Expand aliases and remove duplicates/crossrefs */
     mutt_fix_reply_recipients (msg->env);
@@ -1244,7 +1241,7 @@ int ci_send_message (int flags, /* send mode */
 #ifdef USE_NNTP
     if ((flags & SENDNEWS) && ctx && ctx->magic == M_NNTP
         && !msg->env->newsgroups)
-      msg->env->newsgroups = m_strdup(((NNTP_DATA *) ctx->data)->group);
+      msg->env->newsgroups = m_strdup(((nntp_data_t *)ctx->data)->group);
 #endif
 
     if (!(option (OPTAUTOEDIT) && option (OPTEDITHDRS)) &&
@@ -1292,8 +1289,7 @@ int ci_send_message (int flags, /* send mode */
       killfrom = 0;
     }
 
-    if (option (OPTHDRS))
-      process_user_header (msg->env);
+    process_user_header (msg->env);
 
     /* include replies/forwarded messages, unless we are given a template */
     if (!tempfile && (ctx || !(flags & (SENDREPLY | SENDFORWARD)))