Added setup for character sets

This commit is contained in:
Michiel Broek 2004-02-23 14:46:06 +00:00
parent f7070bee91
commit 022bd58797
11 changed files with 421 additions and 326 deletions

View File

@ -3,11 +3,24 @@ $Id$
v0.51.1 21-Feb-2004 v0.51.1 21-Feb-2004
upgrade:
In all message groups set check/set default character set.
In all message areas set the character set to use with the
global editor (to Latin-1 for example). Local and netmail
areas must be done by hand because they are most likely not
in a group.
SETUP.sh: SETUP.sh:
Changed to support Darwin (OS X). Note that in earlier days Changed to support Darwin (OS X). Note that in earlier days
mbse did compile under OS X, but things are different since mbse did compile under OS X, but things are different since
then. Work is underway to let it compile and run again. then. Work is underway to let it compile and run again.
mbsetup:
In edit message groups added setup for default character set.
In edit message areas added setup for character set for the
area. Also added global edit for character set.
In several places where groups need to be tagged, there is now
a switch (*) to select/deslect all groups at once.
v0.51.0 09-Feb-2004 - 21-Feb-2004 v0.51.0 09-Feb-2004 - 21-Feb-2004

5
TODO
View File

@ -1,6 +1,6 @@
$Id$ $Id$
MBSE BBS V0.51.0 TODO list. MBSE BBS V0.51.1 TODO list.
--------------------------- ---------------------------
These are a list of things that must be implemented one way or These are a list of things that must be implemented one way or
@ -170,9 +170,6 @@ mbsetup:
N: Add switch for file area to skip checking and indexing. N: Add switch for file area to skip checking and indexing.
N: Add menu switches in nodes/groups to select/deselect all groups
at once.
N: Add global setup in menus 9.1 and 10.1 at least to change uplink N: Add global setup in menus 9.1 and 10.1 at least to change uplink
data. data.

View File

@ -1754,6 +1754,7 @@ struct _mgroup {
unsigned xRes8 : 1; unsigned xRes8 : 1;
unsigned StartArea; /* Start at area number */ unsigned StartArea; /* Start at area number */
securityrec LinkSec; /* Default link security */ securityrec LinkSec; /* Default link security */
int Charset; /* Default charaacter set */
}; };

View File

@ -236,8 +236,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
msgs.NetReply = mgroup.NetReply; msgs.NetReply = mgroup.NetReply;
msgs.Active = TRUE; msgs.Active = TRUE;
msgs.Quotes = mgroup.Quotes; msgs.Quotes = mgroup.Quotes;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; msgs.Charset = mgroup.Charset;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
msgs.MaxArticles = CFG.maxarticles; msgs.MaxArticles = CFG.maxarticles;
tag = tl(tag); tag = tl(tag);
for (i = 0; i < strlen(tag); i++) for (i = 0; i < strlen(tag); i++)

View File

@ -673,8 +673,7 @@ int Areas(void)
msgs.Type = ECHOMAIL; msgs.Type = ECHOMAIL;
msgs.MsgKinds = PUBLIC; msgs.MsgKinds = PUBLIC;
msgs.UsrDelete = TRUE; msgs.UsrDelete = TRUE;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; msgs.Charset = FTNC_NONE;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
msgs.MaxArticles = CFG.maxarticles; msgs.MaxArticles = CFG.maxarticles;
strcpy(msgs.Origin, CFG.origin); strcpy(msgs.Origin, CFG.origin);
} }

View File

@ -118,7 +118,7 @@ int compgroup(gr_list **fdp1, gr_list **fdp2)
int E_Group(gr_list **fdp, char *title) int E_Group(gr_list **fdp, char *title)
{ {
int o = 0, n = 0, i, j, x, y, rc = FALSE; int o = 0, n = 0, i, j, x, y, rc = FALSE, All = FALSE;
gr_list *tmp; gr_list *tmp;
clr_index(); clr_index();
@ -172,6 +172,11 @@ int E_Group(gr_list **fdp, char *title)
o += 40; o += 40;
} }
break; break;
case -3:All = !All;
for (tmp = *fdp; tmp; tmp = tmp->next)
tmp->tagged = All;
rc = TRUE;
break;
default:if ((i >= 1) && (i <= n)) { default:if ((i >= 1) && (i <= n)) {
j = 0; j = 0;
rc = TRUE; rc = TRUE;

View File

@ -627,21 +627,22 @@ char *select_aka(int max, int items)
/* /*
* Select menu, max is the highest item to pick. Returns zero if * Select menu, max is the highest item to pick. Returns zero if
* "-" (previous level) is selected, -2 and -1 for the N and P keys. * "-" (previous level) is selected, -2 and -1 for the N and P keys.
* If allowall, the -3 is for the * key.
*/ */
int select_menu_sub(int, int, char *); int select_menu_sub(int, int, int, char *);
int select_menu(int max) int select_menu(int max)
{ {
return select_menu_sub(max, 50, (char *)"Select menu item"); return select_menu_sub(max, 50, FALSE, (char *)"Select menu item");
} }
int select_tag(int max) int select_tag(int max)
{ {
return select_menu_sub(max, 40, (char *)"Toggle item"); return select_menu_sub(max, 40, TRUE, (char *)"Toggle item");
} }
int select_menu_sub(int max, int items, char *hlp) int select_menu_sub(int max, int items, int allowall, char *hlp)
{ {
static char *menu=(char *)"-"; static char *menu=(char *)"-";
char help[81]; char help[81];
@ -649,11 +650,19 @@ int select_menu_sub(int max, int items, char *hlp)
if (max == 0) if (max == 0)
sprintf(help, "Select ^\"-\"^ for previous level"); sprintf(help, "Select ^\"-\"^ for previous level");
else {
if (allowall) {
if (max > items)
sprintf(help, "%s (1..%d), ^\"-\"^ prev. level, ^\"*\"^ (de)select all, ^\"P\" or \"N\"^ to page", hlp, max);
else else
sprintf(help, "%s (1..%d), ^\"-\"^ for previous level, ^\"*\"^ (de)select all", hlp, max);
} else {
if (max > items) if (max > items)
sprintf(help, "%s (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page", hlp, max); sprintf(help, "%s (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page", hlp, max);
else else
sprintf(help, "%s (1..%d), ^\"-\"^ for previous level", hlp, max); sprintf(help, "%s (1..%d), ^\"-\"^ for previous level", hlp, max);
}
}
showhelp(help); showhelp(help);
/* /*
@ -675,6 +684,8 @@ int select_menu_sub(int max, int items, char *hlp)
if (strncmp(menu, "P", 1) == 0) if (strncmp(menu, "P", 1) == 0)
return -2; return -2;
} }
if (allowall && (strncmp(menu, "*", 1) == 0))
return -3;
pick = atoi(menu); pick = atoi(menu);
if ((pick >= 1) && (pick <= max)) if ((pick >= 1) && (pick <= max))
@ -2179,3 +2190,52 @@ char *getmenutype(int val)
char *getchrs(int val)
{
switch (val) {
case FTNC_NONE: return (char *)"Undefined";
case FTNC_CP437: return (char *)"CP437";
case FTNC_CP850: return (char *)"CP850";
case FTNC_CP865: return (char *)"CP865";
case FTNC_CP866: return (char *)"CP866";
case FTNC_LATIN_1: return (char *)"Latin-1";
case FTNC_LATIN_2: return (char *)"Latin-2";
case FTNC_LATIN_5: return (char *)"Latin-5";
case FTNC_MAC: return (char *)"Mac";
default: return (char *)"ERROR";
}
}
void show_charset(int y, int x, int val)
{
show_str(y, x, 9, getchrs(val));
}
int edit_charset(int y, int x, int val)
{
int ch;
showhelp((char *)"Toggle ^Charset^ with spacebar, press <Enter> when done.");
do {
set_color(YELLOW, BLUE);
show_charset(y, x, val);
ch = readkey(y, x, YELLOW, BLUE);
if (ch == ' ') {
if (val < FTNC_MAXCHARS)
val++;
else
val = FTNC_NONE;
}
} while (ch != KEY_ENTER && ch != '\012');
set_color(WHITE, BLACK);
show_charset(y, x, val);
return val;
}

View File

@ -80,6 +80,9 @@ void show_aka(int, int, fidoaddr);
void edit_color(int *, int *, char *, char *); void edit_color(int *, int *, char *, char *);
char *get_color(int); char *get_color(int);
char *getmenutype(int); char *getmenutype(int);
char *getchrs(int);
void show_charset(int, int, int);
int edit_charset(int, int, int);
/* /*

View File

@ -85,8 +85,7 @@ int CountMsgarea(void)
msgs.Quotes = TRUE; msgs.Quotes = TRUE;
msgs.DaysOld = CFG.defdays; msgs.DaysOld = CFG.defdays;
msgs.MaxMsgs = CFG.defmsgs; msgs.MaxMsgs = CFG.defmsgs;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; msgs.Charset = FTNC_NONE;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
strcpy(msgs.Origin, CFG.origin); strcpy(msgs.Origin, CFG.origin);
fwrite(&msgs, sizeof(msgs), 1, fil); fwrite(&msgs, sizeof(msgs), 1, fil);
mkdirs(msgs.Base, 0770); mkdirs(msgs.Base, 0770);
@ -111,8 +110,7 @@ int CountMsgarea(void)
msgs.SYSec.level = 32000; msgs.SYSec.level = 32000;
msgs.DaysOld = CFG.defdays; msgs.DaysOld = CFG.defdays;
msgs.MaxMsgs = CFG.defmsgs; msgs.MaxMsgs = CFG.defmsgs;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; msgs.Charset = FTNC_NONE;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
fwrite(&msgs, sizeof(msgs), 1, fil); fwrite(&msgs, sizeof(msgs), 1, fil);
mkdirs(msgs.Base, 0770); mkdirs(msgs.Base, 0770);
if (Msg_Open(msgs.Base)) if (Msg_Open(msgs.Base))
@ -135,8 +133,7 @@ int CountMsgarea(void)
msgs.SYSec.level = 32000; msgs.SYSec.level = 32000;
msgs.DaysOld = CFG.defdays; msgs.DaysOld = CFG.defdays;
msgs.MaxMsgs = CFG.defmsgs; msgs.MaxMsgs = CFG.defmsgs;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; msgs.Charset = FTNC_NONE;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
fwrite(&msgs, sizeof(msgs), 1, fil); fwrite(&msgs, sizeof(msgs), 1, fil);
mkdirs(msgs.Base, 0770); mkdirs(msgs.Base, 0770);
if (Msg_Open(msgs.Base)) if (Msg_Open(msgs.Base))
@ -220,10 +217,6 @@ int OpenMsgarea(void)
*/ */
memset(&msgs, 0, sizeof(msgs)); memset(&msgs, 0, sizeof(msgs));
while (fread(&msgs, oldsize, 1, fin) == 1) { while (fread(&msgs, oldsize, 1, fin) == 1) {
if ((oldsize != sizeof(msgs)) && !msgs.Rfccode) {
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
}
if ((oldsize != sizeof(msgs)) && !msgs.LinkSec.level) { if ((oldsize != sizeof(msgs)) && !msgs.LinkSec.level) {
msgs.LinkSec.level = 1; msgs.LinkSec.level = 1;
msgs.LinkSec.flags = 1; msgs.LinkSec.flags = 1;
@ -301,8 +294,11 @@ void InitMsgRec(void)
msgs.Type = ECHOMAIL; msgs.Type = ECHOMAIL;
msgs.MsgKinds = PUBLIC; msgs.MsgKinds = PUBLIC;
msgs.UsrDelete = TRUE; msgs.UsrDelete = TRUE;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; #ifdef HAVE_ICONV_H
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN; msgs.Charset = FTNC_LATIN_1;
#else
msgs.Charset = FTNC_NONE;
#endif
msgs.MaxArticles = CFG.maxarticles; msgs.MaxArticles = CFG.maxarticles;
strcpy(msgs.Origin, CFG.origin); strcpy(msgs.Origin, CFG.origin);
msgs.LinkSec.level = 1; msgs.LinkSec.level = 1;
@ -493,38 +489,37 @@ void SetScreen()
mvprintw(14, 2, "9. Distrib."); mvprintw(14, 2, "9. Distrib.");
mvprintw(15, 2, "10. Area Type"); mvprintw(15, 2, "10. Area Type");
mvprintw(16, 2, "11. Msg Kinds"); mvprintw(16, 2, "11. Msg Kinds");
mvprintw(17, 2, "12. FTN chars"); mvprintw(17, 2, "12. Charset");
mvprintw(18, 2, "13. RFC chars"); mvprintw(18, 2, "13. Active");
mvprintw(19, 2, "14. Active"); mvprintw(19, 2, "14. Days Old");
mvprintw(13,34, "15. Days Old"); mvprintw(13,34, "15. Max. Msgs");
mvprintw(14,34, "16. Max. Msgs");
switch (msgs.Type) { switch (msgs.Type) {
case ECHOMAIL: mvprintw(15,34, "17. Netreply"); case ECHOMAIL: mvprintw(14,34, "16. Netreply");
break; break;
case NEWS: mvprintw(15,34, "17. Articles"); case NEWS: mvprintw(14,34, "16. Articles");
break; break;
default: mvprintw(15,34, "17. N/A"); default: mvprintw(14,34, "16. N/A");
break; break;
} }
mvprintw(16,34, "18. Read Sec."); mvprintw(15,34, "17. Read Sec.");
mvprintw(17,34, "19. Write Sec."); mvprintw(16,34, "18. Write Sec.");
mvprintw(18,34, "20. Sysop Sec."); mvprintw(17,34, "19. Sysop Sec.");
mvprintw(19,34, "21. User Del."); mvprintw(18,34, "20. User Del.");
mvprintw(19,34, "21. Aliases");
mvprintw(12,58, "22. Aliases"); mvprintw(13,58, "22. Quotes");
mvprintw(13,58, "23. Quotes"); mvprintw(14,58, "23. Mandatory");
mvprintw(14,58, "24. Mandatory"); mvprintw(15,58, "24. UnSecure");
mvprintw(15,58, "25. UnSecure"); mvprintw(16,58, "25. OLR Default");
mvprintw(16,58, "26. OLR Default"); mvprintw(17,58, "26. OLR Forced");
mvprintw(17,58, "27. OLR Forced");
switch (msgs.Type) { switch (msgs.Type) {
case ECHOMAIL: case ECHOMAIL:
case NEWS: case NEWS:
case LIST: mvprintw(18,58, "28. Connections"); case LIST: mvprintw(18,58, "27. Connections");
break; break;
} }
mvprintw(19,58, "29. Security"); mvprintw(19,58, "28. Security");
} }
@ -639,7 +634,7 @@ void MsgGlobal(void)
char *p, mfile[PATH_MAX]; char *p, mfile[PATH_MAX];
FILE *fil; FILE *fil;
fidoaddr a1, a2; fidoaddr a1, a2;
int menu = 0, marea, Areas, akan = 0, Found; int menu = 0, marea, Areas, akan = 0, Found, charset = FTNC_LATIN_1;
int Total, Done, netbrd, daysold, maxmsgs, maxarticles; int Total, Done, netbrd, daysold, maxmsgs, maxarticles;
long offset; long offset;
securityrec rs, ws, ss, as; securityrec rs, ws, ss, as;
@ -694,14 +689,15 @@ void MsgGlobal(void)
mvprintw(14, 6, "8. Change bbs security"); mvprintw(14, 6, "8. Change bbs security");
mvprintw(15, 6, "9. Change link security"); mvprintw(15, 6, "9. Change link security");
mvprintw(16, 6, "10. Change aka to use"); mvprintw(16, 6, "10. Change aka to use");
mvprintw(17, 6, "11. Change origin line"); mvprintw( 7,41, "11. Change origin line");
mvprintw(18, 6, "12. Change netmail reply"); mvprintw( 8,41, "12. Change netmail reply");
mvprintw(19, 6, "13. Delete message area"); mvprintw( 9,41, "13. Change character set");
mvprintw(10,41, "14. Delete message area");
memset(&a1, 0, sizeof(fidoaddr)); memset(&a1, 0, sizeof(fidoaddr));
memset(&a2, 0, sizeof(fidoaddr)); memset(&a2, 0, sizeof(fidoaddr));
menu = select_menu(13); menu = select_menu(14);
switch (menu) { switch (menu) {
case 0: tidy_grlist(&mgr); case 0: tidy_grlist(&mgr);
return; return;
@ -736,6 +732,9 @@ void MsgGlobal(void)
case 11:E_STR(LINES -3, 5, 64, mfile, "Enter new ^origin^ line"); case 11:E_STR(LINES -3, 5, 64, mfile, "Enter new ^origin^ line");
case 12:mvprintw(LINES -3, 5, "Netmail reply board"); case 12:mvprintw(LINES -3, 5, "Netmail reply board");
E_INT(LINES -3, 25, netbrd, (char *)"The ^netmail reply^ board number") E_INT(LINES -3, 25, netbrd, (char *)"The ^netmail reply^ board number")
case 13:mvprintw(LINES -3, 5, "Character set to set");
charset = edit_charset(LINES -3,26, charset);
break;
} }
E_Group(&mgr, (char *)"SELECT MESSAGE GROUPS TO CHANGE"); E_Group(&mgr, (char *)"SELECT MESSAGE GROUPS TO CHANGE");
@ -782,7 +781,9 @@ void MsgGlobal(void)
break; break;
case 12:mvprintw(7, 6, "New netmail reply board %d", netbrd); case 12:mvprintw(7, 6, "New netmail reply board %d", netbrd);
break; break;
case 13:mvprintw(7, 6, "Delete message areas"); case 13:mvprintw(7, 6, "New character set %s", getchrs(charset));
break;
case 14:mvprintw(7, 6, "Delete message areas");
break; break;
} }
@ -965,7 +966,15 @@ void MsgGlobal(void)
} }
} }
break; break;
case 13:if (msgs.Active) { case 13:if (charset != msgs.Charset) {
msgs.Charset = charset;
if (SaveMsgRec(marea, FALSE) == 0) {
Done++;
Syslog('+', "Changed character set to %s in area %s", getchrs(charset), msgs.Tag);
}
}
break;
case 14:if (msgs.Active) {
msgs.Active = FALSE; msgs.Active = FALSE;
Msg_DeleteMsgBase(msgs.Base); Msg_DeleteMsgBase(msgs.Base);
memset(&msgs, 0, sizeof(msgs)); memset(&msgs, 0, sizeof(msgs));
@ -1029,24 +1038,23 @@ int EditMsgRec(int Area)
show_str(14,16,16, msgs.Distribution); show_str(14,16,16, msgs.Distribution);
show_msgtype(15,16, msgs.Type); show_msgtype(15,16, msgs.Type);
show_msgkinds(16,16, msgs.MsgKinds); show_msgkinds(16,16, msgs.MsgKinds);
// show_str(17,16,16, printable(getchrs(msgs.Ftncode), 0)); show_charset(17,16, msgs.Charset);
// show_str(18,16,16, printable(getchrs(msgs.Rfccode), 0)); show_bool(18,16, msgs.Active);
show_bool(19,16, msgs.Active); show_int( 19,16, msgs.DaysOld);
show_int( 13,50, msgs.DaysOld); show_int( 13,50, msgs.MaxMsgs);
show_int( 14,50, msgs.MaxMsgs);
switch (msgs.Type) { switch (msgs.Type) {
case ECHOMAIL: show_int( 15,50, msgs.NetReply); case ECHOMAIL: show_int( 14,50, msgs.NetReply);
break; break;
case NEWS: show_int( 15,50, msgs.MaxArticles); case NEWS: show_int( 14,50, msgs.MaxArticles);
break; break;
} }
show_int( 16,50, msgs.RDSec.level); show_int( 15,50, msgs.RDSec.level);
show_int( 17,50, msgs.WRSec.level); show_int( 16,50, msgs.WRSec.level);
show_int( 18,50, msgs.SYSec.level); show_int( 17,50, msgs.SYSec.level);
show_bool(19,50, msgs.UsrDelete); show_bool(18,50, msgs.UsrDelete);
show_bool(19,50, msgs.Aliases);
show_bool(12,74, msgs.Aliases);
show_bool(13,74, msgs.Quotes); show_bool(13,74, msgs.Quotes);
show_bool(14,74, msgs.Mandatory); show_bool(14,74, msgs.Mandatory);
show_bool(15,74, msgs.UnSecure); show_bool(15,74, msgs.UnSecure);
@ -1064,7 +1072,7 @@ int EditMsgRec(int Area)
break; break;
} }
switch (select_menu(29)) { switch (select_menu(28)) {
case 0: crc1 = 0xffffffff; case 0: crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&msgs, crc1, msgshdr.recsize); crc1 = upd_crc32((char *)&msgs, crc1, msgshdr.recsize);
fseek(tfil, 0, 0); fseek(tfil, 0, 0);
@ -1122,8 +1130,7 @@ int EditMsgRec(int Area)
msgs.NetReply = mgroup.NetReply; msgs.NetReply = mgroup.NetReply;
msgs.Quotes = mgroup.Quotes; msgs.Quotes = mgroup.Quotes;
msgs.MaxArticles = CFG.maxarticles; msgs.MaxArticles = CFG.maxarticles;
msgs.Rfccode = 0; // CHRS_DEFAULT_RFC; msgs.Charset = mgroup.Charset;
msgs.Ftncode = 0; // CHRS_DEFAULT_FTN;
strncpy(msgs.Origin, CFG.origin, 50); strncpy(msgs.Origin, CFG.origin, 50);
msgs.LinkSec = mgroup.LinkSec; msgs.LinkSec = mgroup.LinkSec;
@ -1249,7 +1256,8 @@ int EditMsgRec(int Area)
SetScreen(); SetScreen();
break; break;
case 11:msgs.MsgKinds = edit_msgkinds(16,16, msgs.MsgKinds); break; case 11:msgs.MsgKinds = edit_msgkinds(16,16, msgs.MsgKinds); break;
case 14:Active = edit_bool(19,16, msgs.Active, (char *)"Is this area ^Active^"); case 12:msgs.Charset = edit_charset(17,16, msgs.Charset); break;
case 13:Active = edit_bool(18,16, msgs.Active, (char *)"Is this area ^Active^");
if (msgs.Active && !Active) { if (msgs.Active && !Active) {
/* /*
* Attempt to deactivate area, do some checks. * Attempt to deactivate area, do some checks.
@ -1285,29 +1293,29 @@ int EditMsgRec(int Area)
msgs.Active = TRUE; msgs.Active = TRUE;
SetScreen(); SetScreen();
break; break;
case 15:E_INT( 13,50, msgs.DaysOld, "Maximum ^days^ to keep mail in this area") case 14:E_INT( 19,16, msgs.DaysOld, "Maximum ^days^ to keep mail in this area")
case 16:E_INT( 14,50, msgs.MaxMsgs, "The ^maximum^ amount of messages in this area") case 15:E_INT( 13,50, msgs.MaxMsgs, "The ^maximum^ amount of messages in this area")
case 17:switch (msgs.Type) { case 16:switch (msgs.Type) {
case ECHOMAIL: msgs.NetReply = edit_int(15,50,msgs.NetReply, case ECHOMAIL: msgs.NetReply = edit_int(14,50,msgs.NetReply,
(char *)"The ^Area Number^ for netmail replies"); (char *)"The ^Area Number^ for netmail replies");
break; break;
case NEWS: msgs.MaxArticles = edit_int(15,50,msgs.MaxArticles, case NEWS: msgs.MaxArticles = edit_int(14,50,msgs.MaxArticles,
(char *)"The ^maximum news articles^ to fetch"); (char *)"The ^maximum news articles^ to fetch");
break; break;
} }
break; break;
case 18:E_SEC( 16,50, msgs.RDSec, "9.2 EDIT READ SECURITY", SetScreen) case 17:E_SEC( 15,50, msgs.RDSec, "9.2 EDIT READ SECURITY", SetScreen)
case 19:E_SEC( 17,50, msgs.WRSec, "9.2 EDIT WRITE SECURITY", SetScreen) case 18:E_SEC( 16,50, msgs.WRSec, "9.2 EDIT WRITE SECURITY", SetScreen)
case 20:E_SEC( 18,50, msgs.SYSec, "9.2 EDIT SYSOP SECURITY", SetScreen) case 19:E_SEC( 17,50, msgs.SYSec, "9.2 EDIT SYSOP SECURITY", SetScreen)
case 21:E_BOOL(19,50, msgs.UsrDelete, "Allow users to ^Delete^ their messages") case 20:E_BOOL(18,50, msgs.UsrDelete, "Allow users to ^Delete^ their messages")
case 21:E_BOOL(19,50, msgs.Aliases, "Allow ^aliases^ or real names only")
case 22:E_BOOL(12,74, msgs.Aliases, "Allow ^aliases^ or real names only") case 22:E_BOOL(13,74, msgs.Quotes, "Add random ^quotes^ to new messages")
case 23:E_BOOL(13,74, msgs.Quotes, "Add random ^quotes^ to new messages") case 23:E_BOOL(14,74, msgs.Mandatory, "Is this area ^mandatory^ for nodes")
case 24:E_BOOL(14,74, msgs.Mandatory, "Is this area ^mandatory^ for nodes") case 24:E_BOOL(15,74, msgs.UnSecure, "Toss messages ^UnSecure^, ie: no originating check")
case 25:E_BOOL(15,74, msgs.UnSecure, "Toss messages ^UnSecure^, ie: no originating check") case 25:E_BOOL(16,74, msgs.OLR_Default, "Area is ^default^ for ^offline^ users.")
case 26:E_BOOL(16,74, msgs.OLR_Default, "Area is ^default^ for ^offline^ users.") case 26:E_BOOL(17,74, msgs.OLR_Forced, "Area is ^always on^ for ^offline^ users.")
case 27:E_BOOL(17,74, msgs.OLR_Forced, "Area is ^always on^ for ^offline^ users.") case 27:switch (msgs.Type) {
case 28:switch (msgs.Type) {
case ECHOMAIL: case ECHOMAIL:
case NEWS: case NEWS:
case LIST: if (EditConnections(tfil)) case LIST: if (EditConnections(tfil))
@ -1316,7 +1324,7 @@ int EditMsgRec(int Area)
break; break;
} }
break; break;
case 29:msgs.LinkSec = edit_asec(msgs.LinkSec, (char *)"9.2 EDIT LINK SECURITY"); case 28:msgs.LinkSec = edit_asec(msgs.LinkSec, (char *)"9.2 EDIT LINK SECURITY");
SetScreen(); SetScreen();
break; break;
} }
@ -1804,8 +1812,7 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Offline name %s\n", msgs.QWKname); fprintf(fp, " Offline name %s\n", msgs.QWKname);
fprintf(fp, " Area type %s\n", getmsgtype(msgs.Type)); fprintf(fp, " Area type %s\n", getmsgtype(msgs.Type));
fprintf(fp, " Messages type %s\n", getmsgkinds(msgs.MsgKinds)); fprintf(fp, " Messages type %s\n", getmsgkinds(msgs.MsgKinds));
// fprintf(fp, " FTN charset %s\n", printable(getchrs(msgs.Ftncode), 0)); fprintf(fp, " Character set %s\n", getchrs(msgs.Charset));
// fprintf(fp, " RFC charset %s\n", printable(getchrs(msgs.Rfccode), 0));
fprintf(fp, " Days old msgs. %d\n", msgs.DaysOld); fprintf(fp, " Days old msgs. %d\n", msgs.DaysOld);
fprintf(fp, " Maximum msgs. %d\n", msgs.MaxMsgs); fprintf(fp, " Maximum msgs. %d\n", msgs.MaxMsgs);
fprintf(fp, " Max articles %d\n", msgs.MaxArticles); fprintf(fp, " Max articles %d\n", msgs.MaxArticles);

View File

@ -154,6 +154,9 @@ int OpenMGroup(void)
mgroup.LinkSec.level = 1; mgroup.LinkSec.level = 1;
mgroup.LinkSec.flags = 1; mgroup.LinkSec.flags = 1;
} }
if (MGrpUpdated && (mgroup.Charset == FTNC_NONE)) {
mgroup.Charset = FTNC_LATIN_1;
}
fwrite(&mgroup, sizeof(mgroup), 1, fout); fwrite(&mgroup, sizeof(mgroup), 1, fout);
memset(&mgroup, 0, sizeof(mgroup)); memset(&mgroup, 0, sizeof(mgroup));
} }
@ -227,6 +230,7 @@ int AppendMGroup(void)
mgroup.StartDate = time(NULL); mgroup.StartDate = time(NULL);
mgroup.LinkSec.level = 1; mgroup.LinkSec.level = 1;
mgroup.LinkSec.flags = 1; mgroup.LinkSec.flags = 1;
mgroup.Charset = FTNC_LATIN_1;
fwrite(&mgroup, sizeof(mgroup), 1, fil); fwrite(&mgroup, sizeof(mgroup), 1, fil);
fclose(fil); fclose(fil);
MGrpUpdated = 1; MGrpUpdated = 1;
@ -257,12 +261,14 @@ void MgScreen(void)
mvprintw(18, 2, "12. Quotes"); mvprintw(18, 2, "12. Quotes");
mvprintw(19, 2, "13. Active"); mvprintw(19, 2, "13. Active");
mvprintw(14,41, "14. Deleted"); mvprintw(14,26, "14. Deleted");
mvprintw(15,41, "15. Auto change"); mvprintw(15,26, "15. Auto change");
mvprintw(16,41, "16. User change"); mvprintw(16,26, "16. User change");
mvprintw(17,41, "17. Use Aka"); mvprintw(17,26, "17. Use Aka");
mvprintw(18,41, "18. Uplink"); mvprintw(18,26, "18. Uplink");
mvprintw(19,41, "19. Areas"); mvprintw(19,26, "19. Areas");
mvprintw(14,54, "20. Charset");
} }
@ -336,14 +342,16 @@ int EditMGrpRec(int Area)
show_bool(18,16, mgroup.Quotes); show_bool(18,16, mgroup.Quotes);
show_bool(19,16, mgroup.Active); show_bool(19,16, mgroup.Active);
show_bool(14,57, mgroup.Deleted); show_bool(14,42, mgroup.Deleted);
show_bool(15,57, mgroup.AutoChange); show_bool(15,42, mgroup.AutoChange);
show_bool(16,57, mgroup.UserChange); show_bool(16,42, mgroup.UserChange);
show_aka( 17,57, mgroup.UseAka); show_aka( 17,42, mgroup.UseAka);
show_aka( 18,57, mgroup.UpLink); show_aka( 18,42, mgroup.UpLink);
show_str( 19,57,12, mgroup.AreaFile); show_str( 19,42,12, mgroup.AreaFile);
j = select_menu(19); show_charset(14,70, mgroup.Charset);
j = select_menu(20);
switch(j) { switch(j) {
case 0: if (!mgroup.StartArea && strlen(mgroup.AreaFile)) { case 0: if (!mgroup.StartArea && strlen(mgroup.AreaFile)) {
errmsg("Areas file defined but no BBS start area"); errmsg("Areas file defined but no BBS start area");
@ -401,9 +409,9 @@ int EditMGrpRec(int Area)
E_BOOL(19,16, mgroup.Active, "Is this message group ^active^") E_BOOL(19,16, mgroup.Active, "Is this message group ^active^")
case 14:if (CheckMgroup()) case 14:if (CheckMgroup())
break; break;
E_BOOL(14,57, mgroup.Deleted, "Is this group ^Deleted^") E_BOOL(14,42, mgroup.Deleted, "Is this group ^Deleted^")
case 15:E_BOOL(15,57, mgroup.AutoChange, "^Auto change^ areas from new areas lists") case 15:E_BOOL(15,42, mgroup.AutoChange, "^Auto change^ areas from new areas lists")
case 16:tmp = edit_bool(16,57, mgroup.UserChange, (char *)"^Auto add/delete^ areas from downlinks requests"); case 16:tmp = edit_bool(16,42, mgroup.UserChange, (char *)"^Auto add/delete^ areas from downlinks requests");
if (tmp && !mgroup.UpLink.zone) if (tmp && !mgroup.UpLink.zone)
errmsg("It looks like you are the toplevel, no Uplink defined"); errmsg("It looks like you are the toplevel, no Uplink defined");
else else
@ -417,7 +425,9 @@ int EditMGrpRec(int Area)
case 18:mgroup.UpLink = PullUplink((char *)"9.1.18"); case 18:mgroup.UpLink = PullUplink((char *)"9.1.18");
MgScreen(); MgScreen();
break; break;
case 19:E_STR( 19,57,12, mgroup.AreaFile, "The name of the ^Areas File^ from the uplink") case 19:E_STR( 19,42,12, mgroup.AreaFile, "The name of the ^Areas File^ from the uplink")
case 20:mgroup.Charset = edit_charset(14, 70, mgroup.Charset);
break;
} }
} }
@ -667,7 +677,8 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Use aliases %s\n", getboolean(mgroup.Aliases)); fprintf(fp, " Use aliases %s\n", getboolean(mgroup.Aliases));
fprintf(fp, " Add quotes %s\n", getboolean(mgroup.Quotes)); fprintf(fp, " Add quotes %s\n", getboolean(mgroup.Quotes));
fprintf(fp, " Auto add/del areas %s\n", getboolean(mgroup.AutoChange)); fprintf(fp, " Auto add/del areas %s\n", getboolean(mgroup.AutoChange));
fprintf(fp, " user add/del areas %s\n", getboolean(mgroup.UserChange)); fprintf(fp, " User add/del areas %s\n", getboolean(mgroup.UserChange));
fprintf(fp, " Default charset %s\n", getchrs(mgroup.Charset));
fprintf(fp, " Start area date %s", ctime(&mgroup.StartDate)); fprintf(fp, " Start area date %s", ctime(&mgroup.StartDate));
fprintf(fp, " Last active date %s\n", ctime(&mgroup.LastDate)); fprintf(fp, " Last active date %s\n", ctime(&mgroup.LastDate));
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");

View File

@ -420,7 +420,7 @@ int EditNewRec(int Area)
case 10:E_BOOL(16,18, newfiles.Active, "If this report is ^active^") case 10:E_BOOL(16,18, newfiles.Active, "If this report is ^active^")
case 11:E_BOOL(17,18, newfiles.Deleted, "Is this record ^deleted^") case 11:E_BOOL(17,18, newfiles.Deleted, "Is this record ^deleted^")
case 12:E_BOOL(16,58, newfiles.HiAscii, "Allow ^High ASCII^ in this report") case 12:E_BOOL(16,58, newfiles.HiAscii, "Allow ^High ASCII^ in this report")
case 13:if (E_Group(&fgr, (char *)"12.12 NEWFILE GROUPS")) case 13:if (E_Group(&fgr, (char *)"12.13 NEWFILE GROUPS"))
GrpChanged = TRUE; GrpChanged = TRUE;
break; break;
} }