Skip to content
Snippets Groups Projects
Commit 953fb85b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Create the "Servers" configuration sub-menu, currently read-only

I'm surprised more people haven't wondered aloud: why are all the Synchronet
server settings in this huge sbbs.ini file? Well... this kind of answers that
question: it's a hell of a lot of settings! And this isn't even everything
(several advanced/rarely-used/borderline-deprecated settings aren't included)!

As part of this change, I've replaced the old date/time display with the
current config file path/name that's being edited (more or less). This will
help when a sysop has multiple sbbs.*.ini files and makes it clear if you have
multiple sbbs installs (like me), which one you're editing at any given time.

I have not implemented any of the server setting edits (other than a couple
simple toggles) or help text yet and this does not detect changes or save them
to the sbbs.ini file, but I wanted to get this committed at this stage anyway.
If you're running sbbsctrl.exe (or maybe even gtkmonitor), then maybe this is
completely redundant and unnecessary, but I figured it was good to have these
settings in one edit find/edit platform-agnostic location anyway. Hoepfully
this will (when its done) make SBBS for *nix just that much easier for a newbie
sysop/sysadmin.
parent ffe092b6
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3973 failed
......@@ -9,6 +9,7 @@ OBJS = $(MTOBJODIR)/scfg$(OFILE)\
$(MTOBJODIR)/scfgmsg$(OFILE)\
$(MTOBJODIR)/scfgnet$(OFILE)\
$(MTOBJODIR)/scfgnode$(OFILE)\
$(MTOBJODIR)/scfgsrvr$(OFILE)\
$(MTOBJODIR)/scfgsub$(OFILE)\
$(MTOBJODIR)/scfgsys$(OFILE)\
$(MTOBJODIR)/scfgxfr1$(OFILE)\
......@@ -18,6 +19,7 @@ OBJS = $(MTOBJODIR)/scfg$(OFILE)\
$(MTOBJODIR)/scfglib1$(OFILE)\
$(MTOBJODIR)/scfglib2$(OFILE)\
$(MTOBJODIR)/getctrl$(OFILE)\
$(MTOBJODIR)/sbbs_ini$(OFILE)\
$(MTOBJODIR)/load_cfg$(OFILE)\
$(MTOBJODIR)/readtext$(OFILE)\
$(MTOBJODIR)/text_defaults$(OFILE)\
......
This diff is collapsed.
......@@ -115,6 +115,7 @@ extern char* area_sort_desc[AREA_SORT_TYPES+1];
/* Function Prototypes */
/***********************/
void display_filename(const char*);
void bail(int code);
void errormsg(int line, const char* function, const char *source, const char* action, const char *object, ulong access);
void clearptrs(int subnum);
......@@ -146,6 +147,7 @@ void init_mdms(void);
void guru_cfg(void);
void actsets_cfg(void);
void chan_cfg(void);
void server_cfg(void);
void mdm_cfg(int mdmnum);
void wizard_msg(int page, int total, const char* text);
int edit_sys_name(int page, int total);
......@@ -185,7 +187,7 @@ BOOL save_main_cfg(scfg_t*, int);
BOOL save_node_cfg(scfg_t*, int);
BOOL save_msgs_cfg(scfg_t*, int);
BOOL save_file_cfg(scfg_t*, int);
BOOL save_chat_cfg(scfg_t*, int);
BOOL save_chat_cfg(scfg_t*, int);
BOOL save_xtrn_cfg(scfg_t*, int);
long import_msg_areas(enum import_list_type, FILE*, unsigned grpnum, int min_confnum, int max_confnum
......
......@@ -15,7 +15,7 @@
* http://www.synchro.net/source.html *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
****************************************************************************/
#include "scfg.h"
......@@ -36,6 +36,7 @@ void node_menu()
static int node_menu_dflt, node_bar;
while(1) {
display_filename("");
for(i=0;i<cfg.sys_nodes;i++)
sprintf(opt[i],"Node %d",i+1);
opt[i][0]=0;
......@@ -70,9 +71,9 @@ void node_menu()
if(i==-1) {
if(savnode) {
free_node_cfg(&cfg);
savnode=0;
savnode=0;
}
return;
return;
}
int msk = i & MSK_ON;
if(msk == MSK_DEL) {
......@@ -91,7 +92,7 @@ void node_menu()
save_main_cfg(&cfg,backup_level);
refresh_cfg(&cfg);
}
continue;
continue;
}
if(msk == MSK_INS && cfg.sys_nodes < MAX_NODES) {
SAFECOPY(cfg.node_dir,cfg.node_path[cfg.sys_nodes-1]);
......@@ -132,7 +133,7 @@ void node_menu()
SAFECOPY(cfg.node_dir,cfg.node_path[i]);
load_node_cfg(&cfg,error, sizeof(error));
savnode=1;
continue;
continue;
}
if(msk == MSK_PASTE) {
i&=MSK_OFF;
......@@ -145,7 +146,7 @@ void node_menu()
if(savnode) {
free_node_cfg(&cfg);
savnode=0;
savnode=0;
}
SAFECOPY(cfg.node_dir,cfg.node_path[i]);
prep_dir(cfg.ctrl_dir, cfg.node_dir, sizeof(cfg.node_dir));
......@@ -155,9 +156,12 @@ void node_menu()
cfg.node_num = i + 1; /* so fix it */
save_node_cfg(&cfg, backup_level); /* and write it back */
}
char cfg_fname[MAX_PATH + 1];
SAFEPRINTF(cfg_fname, "%snode.ini", cfg.node_dir);
display_filename(cfg_fname);
node_cfg();
free_node_cfg(&cfg);
free_node_cfg(&cfg);
}
}
......@@ -244,11 +248,11 @@ void node_cfg()
,"Allow 8-bit Remote Input During Login",uifcYesNoOpts);
if(i==1 && !(cfg.node_misc&NM_7BITONLY)) {
cfg.node_misc|=NM_7BITONLY;
uifc.changes=1;
uifc.changes=1;
}
else if(i==0 && (cfg.node_misc&NM_7BITONLY)) {
cfg.node_misc&=~NM_7BITONLY;
uifc.changes=1;
uifc.changes=1;
}
break;
case 1:
......@@ -263,11 +267,11 @@ void node_cfg()
,"Spinning Cursor at Pause Prompt",uifcYesNoOpts);
if(i==0 && cfg.node_misc&NM_NOPAUSESPIN) {
cfg.node_misc&=~NM_NOPAUSESPIN;
uifc.changes=1;
uifc.changes=1;
}
else if(i==1 && !(cfg.node_misc&NM_NOPAUSESPIN)) {
cfg.node_misc|=NM_NOPAUSESPIN;
uifc.changes=1;
uifc.changes=1;
}
break;
case 2:
......@@ -284,11 +288,11 @@ void node_cfg()
,"Keep Node File Open",uifcYesNoOpts);
if(i==0 && cfg.node_misc&NM_CLOSENODEDAB) {
cfg.node_misc&=~NM_CLOSENODEDAB;
uifc.changes=1;
uifc.changes=1;
}
else if(i==1 && !(cfg.node_misc&NM_CLOSENODEDAB)) {
cfg.node_misc|=NM_CLOSENODEDAB;
uifc.changes=1;
uifc.changes=1;
}
break;
}
......@@ -376,10 +380,10 @@ void node_cfg()
;
uifc.input(WIN_MID|WIN_SAV,0,10,"Text Directory"
,cfg.text_dir,sizeof(cfg.text_dir)-1,K_EDIT);
break;
}
break;
}
}
break;
}
}
}
}
This diff is collapsed.
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