From: Art Cancro Date: Thu, 4 Jul 2019 20:09:40 +0000 (-0400) Subject: nter-message command in the text client now warns the user that this creates a... X-Git-Tag: v939~290 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a6722156441811d3cddce7179eb56c483eebd37f nter-message command in the text client now warns the user that this creates a top level blog post instead of a comment. --- diff --git a/textclient/Makefile b/textclient/Makefile index 5203ea493..3fdd066e5 100644 --- a/textclient/Makefile +++ b/textclient/Makefile @@ -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 diff --git a/textclient/citadel.c b/textclient/citadel.c index 3832838ca..1fea75eb3 100644 --- a/textclient/citadel.c +++ b/textclient/citadel.c @@ -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; } diff --git a/textclient/configure b/textclient/configure index d75fd297f..04821c612 100755 --- a/textclient/configure +++ b/textclient/configure @@ -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]' diff --git a/textclient/messages.c b/textclient/messages.c index 67d656dba..cb5e4dd1b 100644 --- a/textclient/messages.c +++ b/textclient/messages.c @@ -1050,7 +1050,21 @@ int entmsg(CtdlIPC * ipc, int is_reply, /* nonzero if this was a 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 '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 '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); } diff --git a/textclient/textclient.h b/textclient/textclient.h index 74f70e63a..a945db18a 100644 --- a/textclient/textclient.h +++ b/textclient/textclient.h @@ -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