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
/*
* 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.
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;
}
# 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"
--bindir)
BINDIR=$v
;;
+ --etcdir)
+ ETCDIR=$v
+ ;;
--ctdldir)
CTDLDIR=$v
;;
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]'
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);
}
#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