Skip to content
Snippets Groups Projects
Commit f88eb6f8 authored by rswindell's avatar rswindell
Browse files

Message voting via QWKnet is now fully implemented:

- Sub-boards can be disalbled for voting in SCFG

Removed un-implemented "kill msg when read" sub-board option.
parent 74902cee
No related branches found
No related tags found
No related merge requests found
/* scfgsub.c */
/* $Id$ */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright ob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -188,9 +186,6 @@ while(1) {
"If you want to delete all the messages for this sub-board, select `Yes`.\n"
;
j=1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
SAFEPRINTF2(str,"%s%s.*"
,cfg.grp[cfg.sub[subnum[i]]->grp]->code_prefix
,cfg.sub[subnum[i]]->code_suffix);
......@@ -204,7 +199,7 @@ while(1) {
if(fexist(path)) {
SAFEPRINTF(str2,"Delete %s",path);
j=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,0
,str2,opt);
,str2,uifcYesNoOpts);
if(j==-1)
continue;
if(j==0) {
......@@ -438,15 +433,19 @@ while(1) {
,cfg.sub[i]->misc&SUB_SSDEF ? "Yes":"No");
sprintf(opt[n++],"%-27.27s%s","Public 'To' User"
,cfg.sub[i]->misc&SUB_TOUSER ? "Yes":"No");
sprintf(opt[n++],"%-27.27s%s","Allow Message Voting"
,cfg.sub[i]->misc&SUB_NOVOTING ? "No":"Yes");
sprintf(opt[n++],"%-27.27s%s","Allow Message Quoting"
,cfg.sub[i]->misc&SUB_QUOTE ? "Yes":"No");
sprintf(opt[n++],"%-27.27s%s","Suppress User Signatures"
,cfg.sub[i]->misc&SUB_NOUSERSIG ? "Yes":"No");
sprintf(opt[n++],"%-27.27s%s","Permanent Operator Msgs"
,cfg.sub[i]->misc&SUB_SYSPERM ? "Yes":"No");
#if 0 /* this is not actually implemented (yet?) */
sprintf(opt[n++],"%-27.27s%s","Kill Read Messages"
,cfg.sub[i]->misc&SUB_KILL ? "Yes"
: (cfg.sub[i]->misc&SUB_KILLP ? "Pvt" : "No"));
#endif
sprintf(opt[n++],"%-27.27s%s","Compress Messages (LZH)"
,cfg.sub[i]->misc&SUB_LZH ? "Yes" : "No");
......@@ -536,9 +535,6 @@ while(1) {
break;
case 2:
n=(cfg.sub[i]->misc&SUB_NAME) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`User Real Names in Posts on Sub-board:`\n"
"\n"
......@@ -547,7 +543,7 @@ while(1) {
"this option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Use Real Names in Posts",opt);
,"Use Real Names in Posts",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_NAME)) {
......@@ -646,9 +642,6 @@ while(1) {
break;
case 5:
n=(cfg.sub[i]->misc&SUB_NSDEF) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Default On for New Scan:`\n"
"\n"
......@@ -656,7 +649,7 @@ while(1) {
"by default, set this option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Default On for New Scan",opt);
,"Default On for New Scan",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_NSDEF)) {
......@@ -669,9 +662,6 @@ while(1) {
break;
case 6:
n=(cfg.sub[i]->misc&SUB_FORCED) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Forced On for New Scan:`\n"
"\n"
......@@ -680,7 +670,7 @@ while(1) {
"this option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Forced New Scan",opt);
,"Forced New Scan",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_FORCED)) {
......@@ -693,9 +683,6 @@ while(1) {
break;
case 7:
n=(cfg.sub[i]->misc&SUB_SSDEF) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Default On for Your Scan:`\n"
"\n"
......@@ -703,7 +690,7 @@ while(1) {
"scans by default, set this option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Default On for Your Scan",opt);
,"Default On for Your Scan",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_SSDEF)) {
......@@ -716,9 +703,6 @@ while(1) {
break;
case 8:
n=(cfg.sub[i]->misc&SUB_TOUSER) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Prompt for 'To' User on Public Posts:`\n"
"\n"
......@@ -727,7 +711,7 @@ while(1) {
"are on a network that does not allow private posts.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Prompt for 'To' User on Public Posts",opt);
,"Prompt for 'To' User on Public Posts",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_TOUSER)) {
......@@ -739,10 +723,29 @@ while(1) {
cfg.sub[i]->misc&=~SUB_TOUSER; }
break;
case 9:
n=(cfg.sub[i]->misc&SUB_NOVOTING) ? 1:0;
uifc.helpbuf=
"`Allow Message Voting:`\n"
"\n"
"If you want users to be allowed to Up-Vote or Down-Vote messages on this\n"
"sub-board, set this option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Allow Message Voting",uifcYesNoOpts);
if(n==-1)
break;
if(!n && (cfg.sub[i]->misc&SUB_NOVOTING)) {
uifc.changes=1;
cfg.sub[i]->misc ^= SUB_NOVOTING;
break;
}
if(n==1 && !(cfg.sub[i]->misc&SUB_NOVOTING)) {
uifc.changes=1;
cfg.sub[i]->misc ^= SUB_NOVOTING;
}
break;
case 10:
n=(cfg.sub[i]->misc&SUB_QUOTE) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Allow Message Quoting:`\n"
"\n"
......@@ -750,7 +753,7 @@ while(1) {
"this option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Allow Message Quoting",opt);
,"Allow Message Quoting",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_QUOTE)) {
......@@ -761,11 +764,8 @@ while(1) {
uifc.changes=1;
cfg.sub[i]->misc&=~SUB_QUOTE; }
break;
case 10:
case 11:
n=(cfg.sub[i]->misc&SUB_NOUSERSIG) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"Suppress User Signatures:\n"
"\n"
......@@ -773,7 +773,7 @@ while(1) {
"messages posted in this sub-board, set this option to Yes.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Suppress User Signatures",opt);
,"Suppress User Signatures",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_NOUSERSIG)) {
......@@ -784,11 +784,8 @@ while(1) {
uifc.changes=1;
cfg.sub[i]->misc&=~SUB_NOUSERSIG; }
break;
case 11:
case 12:
n=(cfg.sub[i]->misc&SUB_SYSPERM) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Operator Messages Automatically Permanent:`\n"
"\n"
......@@ -797,7 +794,7 @@ while(1) {
"option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Permanent Operator Messages",opt);
,"Permanent Operator Messages",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_SYSPERM)) {
......@@ -808,6 +805,7 @@ while(1) {
uifc.changes=1;
cfg.sub[i]->misc&=~SUB_SYSPERM; }
break;
#if 0 /* This is not actually imlemented (yet?) */
case 12:
if(cfg.sub[i]->misc&SUB_KILLP)
n=2;
......@@ -842,11 +840,9 @@ while(1) {
cfg.sub[i]->misc&=~SUB_KILL;
break; }
break;
#endif
case 13:
n=(cfg.sub[i]->misc&SUB_LZH) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Compress Messages with LZH Encoding:`\n"
"\n"
......@@ -861,7 +857,7 @@ while(1) {
"compatible mail programs you use support the `LZH` translation.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Compress Messages (LZH)",opt);
,"Compress Messages (LZH)",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_LZH)) {
......@@ -910,9 +906,6 @@ while(1) {
switch(n) {
case 0:
n=0;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Append Tag/Origin Line to Posts:`\n"
"\n"
......@@ -921,7 +914,7 @@ while(1) {
"sub-board, set this option to `No`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Append Tag/Origin Line to Posts",opt);
,"Append Tag/Origin Line to Posts",uifcYesNoOpts);
if(n==-1)
break;
if(!n && cfg.sub[i]->misc&SUB_NOTAG) {
......@@ -934,9 +927,6 @@ while(1) {
break;
case 1:
n=0;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Export ASCII Characters Only:`\n"
"\n"
......@@ -945,7 +935,7 @@ while(1) {
"to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Export ASCII Characters Only",opt);
,"Export ASCII Characters Only",uifcYesNoOpts);
if(n==-1)
break;
if(n && cfg.sub[i]->misc&SUB_ASCII) {
......@@ -958,9 +948,6 @@ while(1) {
break;
case 2:
n=1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Gate Between Net Types:`\n"
"\n"
......@@ -978,7 +965,7 @@ while(1) {
"BBS.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Gate Between Net Types",opt);
,"Gate Between Net Types",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_GATE)) {
......@@ -991,9 +978,6 @@ while(1) {
break;
case 3:
n=1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Sub-board Networked via QWK Packets:`\n"
"\n"
......@@ -1004,7 +988,7 @@ while(1) {
"properly.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Networked via QWK Packets",opt);
,"Networked via QWK Packets",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_QNET)) {
......@@ -1028,9 +1012,6 @@ while(1) {
break;
case 5:
n=1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Sub-board Networked via Internet:`\n"
"\n"
......@@ -1040,7 +1021,7 @@ while(1) {
"It will allow the `N`etwork user restriction to function properly.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Networked via Internet",opt);
,"Networked via Internet",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_INET)) {
......@@ -1053,9 +1034,6 @@ while(1) {
break;
case 6:
n=1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Sub-board Networked via PostLink or PCRelay:`\n"
"\n"
......@@ -1066,7 +1044,7 @@ while(1) {
"restriction to function properly.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Networked via PostLink or PCRelay",opt);
,"Networked via PostLink or PCRelay",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_PNET)) {
......@@ -1079,9 +1057,6 @@ while(1) {
break;
case 7:
n=1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
uifc.helpbuf=
"`Sub-board Networked via FidoNet EchoMail:`\n"
"\n"
......@@ -1089,7 +1064,7 @@ while(1) {
"option to `Yes`.\n"
;
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Networked via FidoNet EchoMail",opt);
,"Networked via FidoNet EchoMail",uifcYesNoOpts);
if(n==-1)
break;
if(!n && !(cfg.sub[i]->misc&SUB_FIDO)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment