Temporarily added some debugs and an assert() statement to show where the message...
[citadel.git] / citadel / modules / ctdlproto / serv_messages.c
index 11d61e946fde24f569e74a510aa772afad6aa176..f48060b14d492999158ec755990ee0892b161d89 100644 (file)
@@ -1,6 +1,6 @@
 // Message-related protocol commands for Citadel clients
 //
-// Copyright (c) 1987-2021 by the citadel.org team
+// Copyright (c) 1987-2022 by the citadel.org team
 //
 // This program is open source software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License version 3.
@@ -535,10 +535,8 @@ void cmd_ent0(char *entargs) {
                        }
                }
 
-               if ( ( (valid_to->num_internet + valid_to->num_ignet + valid_cc->num_internet + valid_cc->num_ignet + valid_bcc->num_internet + valid_bcc->num_ignet) > 0)
-                    && (CC->user.axlevel < AxNetU) ) {
-                       cprintf("%d Higher access required for network mail.\n",
-                               ERROR + HIGHER_ACCESS_REQUIRED);
+               if ( ( (valid_to->num_internet + valid_cc->num_internet + valid_bcc->num_internet) > 0) && (CC->user.axlevel < AxNetU) ) {
+                       cprintf("%d Higher access required for network mail.\n", ERROR + HIGHER_ACCESS_REQUIRED);
                        free_recipients(valid_to);
                        free_recipients(valid_cc);
                        free_recipients(valid_bcc);
@@ -604,7 +602,8 @@ void cmd_ent0(char *entargs) {
        /* Read in the message from the client. */
        if (do_confirm) {
                cprintf("%d send message\n", START_CHAT_MODE);
-       } else {
+       }
+       else {
                cprintf("%d send message\n", SEND_LISTING);
        }
 
@@ -614,9 +613,7 @@ void cmd_ent0(char *entargs) {
                              ((!IsEmptyStr(supplied_euid)) ? supplied_euid : NULL),
                              NULL, references);
 
-       /* Put together one big recipients struct containing to/cc/bcc all in
-        * one.  This is for the envelope.
-        */
+       // Put together one big recipients struct containing to/cc/bcc all in one.  This is for the envelope.
        char *all_recps = malloc(SIZ * 3);
        strcpy(all_recps, recp);
        if (!IsEmptyStr(cc)) {
@@ -639,12 +636,9 @@ void cmd_ent0(char *entargs) {
        }
        free(all_recps);
 
-       if ((valid != NULL) && (valid->num_room == 1) && !IsEmptyStr(valid->recp_orgroom))
-       {
-               /* posting into an ML room? set the envelope from 
-                * to the actual mail address so others get a valid
-                * reply-to-header.
-                */
+       // posting into a mailing list room? set the envelope from 
+       // to the actual mail address so others get a valid reply-to-header.
+       if ((valid != NULL) && (valid->num_room == 1) && !IsEmptyStr(valid->recp_orgroom)) {
                CM_SetField(msg, eenVelopeTo, valid->recp_orgroom, strlen(valid->recp_orgroom));
        }