<E>nter-message command in the text client now warns the user that this creates a...
authorArt Cancro <ajc@citadel.org>
Thu, 4 Jul 2019 20:09:40 +0000 (16:09 -0400)
committerArt Cancro <ajc@citadel.org>
Thu, 4 Jul 2019 20:09:40 +0000 (16:09 -0400)
textclient/Makefile
textclient/citadel.c
textclient/configure
textclient/messages.c
textclient/textclient.h

index 5203ea493f2d66a778b3b492b7559178432948aa..3fdd066e5dd5c67e35762d85e2c7529204303828 100644 (file)
@@ -35,8 +35,9 @@ clean:
 distclean: clean
        rm -f config.mk
 
-install: citadel
+install: citadel citadel.rc
        install citadel $(BINDIR)/citadel
+       install citadel.rc $(ETCDIR)/citadel.rc
 
 uninstall:
        rm -vf $(BINDIR)/citadel
index 3832838ca5a48a25061abd2c4381ed8dd647185b..1fea75eb38842077722782d3919324e985b600e6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Main source module for the client program.
  *
- * Copyright (c) 1987-2018 by the citadel.org team
+ * Copyright (c) 1987-2019 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.
@@ -390,11 +390,13 @@ void dotgoto(CtdlIPC * ipc, char *towhere, int display_name, int fromungoto)
        switch (room->RRdefaultview) {
        case VIEW_BBS:
        case VIEW_MAILBOX:
+               entmsg_ok = ENTMSG_OK_YES;
+               break;
        case VIEW_BLOG:
-               entmsg_ok = 1;
+               entmsg_ok = ENTMSG_OK_BLOG;
                break;
        default:
-               entmsg_ok = 0;
+               entmsg_ok = ENTMSG_OK_NO;
                break;
        }
 
index d75fd297f8287d89c1eea1e1cce508a92d57f582..04821c612471752fca075d37dafae2c69b558679 100755 (executable)
@@ -2,7 +2,7 @@
 
 # CONFIGURE SCRIPT FOR CITADEL TEXT CLIENT
 # This file is part of "conf-IG-ure"
-# Copyright (C) 2016-2018 by Art Cancro
+# Copyright (C) 2016-2019 by Art Cancro
 # Distributed under the terms of the GNU General Public License v3 with the following special exceptions:
 # 1. By using this software you agree that it's called "Linux", not "GNU/Linux"
 # 2. By using this software you agree that it's called "open source", not "free software"
@@ -29,6 +29,9 @@ do
                --bindir)
                        BINDIR=$v
                ;;
+               --etcdir)
+                       ETCDIR=$v
+               ;;
                --ctdldir)
                        CTDLDIR=$v
                ;;
@@ -44,6 +47,7 @@ do
                        echo Valid options are:
                        echo '  --prefix=PREFIX         Install files in PREFIX [/usr/local]'
                        echo '  --bindir=DIR            Install executables in DIR [PREFIX/bin]'
+                       echo '  --etcdir=DIR            Install citadel.rc in DIR [PREFIX/etc]'
                        echo '  --ctdldir=DIR           Look for Citadel server in DIR [/usr/local/citadel]'
                        echo '  --with-ssl              Force build with OpenSSL support [normally autodetected]'
                        echo '  --without-ssl           Force build without OpenSSL support [normally autodetected]'
index 67d656dbaef2a37e2284342abbe7a6855b911401..cb5e4dd1b2afd17615f87a2bd096f6e35356ee96 100644 (file)
@@ -1050,7 +1050,21 @@ int entmsg(CtdlIPC * ipc, int is_reply,  /* nonzero if this was a <R>eply command
        int r;                  /* IPC response code */
        int subject_required = 0;
 
-       if (!entmsg_ok) {
+       if (entmsg_ok == ENTMSG_OK_YES) {
+               /* no problem, go right ahead */
+       }
+       else if (entmsg_ok == ENTMSG_OK_BLOG) {
+               if (!is_reply) {
+                       scr_printf("WARNING: this is a BLOG room.\n");
+                       scr_printf("The '<E>nter Message' command will create a BLOG POST.\n");
+                       scr_printf("If you want to leave a comment or reply to a comment, use the '<R>eply' command.\n");
+                       scr_printf("Do you really want to create a new blog post? ");
+                       if (!yesno()) {
+                               return(1);
+                       }
+               }
+       }
+       else {
                scr_printf("You may not enter messages in this type of room.\n");
                return (1);
        }
index 74f70e63a147aead4603b94cd895a6a6359dc256..a945db18ac8e09477533a36ccc049b6dc0dd026a 100644 (file)
@@ -56,6 +56,10 @@ enum {
 #define GF_SKIP                1               /* <;S>kip floor mode */
 #define GF_ZAP         2               /* <;Z>ap floor mode */
 
+/* Can messages be entered in this room? */
+#define ENTMSG_OK_NO   0               /* You may not enter messages here */
+#define ENTMSG_OK_YES  1               /* Go ahead! */
+#define ENTMSG_OK_BLOG 2               /* Yes, but warn the user about how blog rooms work */
 
 /*
  * Colors for color() command