Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 053a4683 authored by deuce's avatar deuce
Browse files

Add an option to hide the status line.

Always prompt for User/PW now that ALT-L exists.
parent b56f74a9
......@@ -68,6 +68,7 @@ void read_list(char *listpath, struct bbslist **list, int *i, int type)
list[*i]->conn_type=CONN_TYPE_RAW;
list[*i]->reversed=iniReadBool(listfile,bbsname,"Reversed",0);
list[*i]->screen_mode=iniReadInteger(listfile,bbsname,"ScreenMode",SCREEN_MODE_CURRENT);
list[*i]->screen_mode=iniReadBool(listfile,bbsname,"NoStatis",0);
list[*i]->type=type;
list[*i]->id=*i;
(*i)++;
......@@ -82,8 +83,8 @@ void read_list(char *listpath, struct bbslist **list, int *i, int type)
int edit_list(struct bbslist *item,char *listpath)
{
char opt[9][80];
char *opts[9];
char opt[10][80];
char *opts[10];
int changed=0;
int copt=0,i,j;
char str[6];
......@@ -91,7 +92,7 @@ int edit_list(struct bbslist *item,char *listpath)
str_list_t inifile;
char tmp[LIST_NAME_MAX+1];
for(i=0;i<9;i++)
for(i=0;i<10;i++)
opts[i]=opt[i];
if(item->type==SYSTEM_BBSLIST) {
uifc.helpbuf= "`Cannot edit system BBS list`\n\n"
......@@ -100,7 +101,7 @@ int edit_list(struct bbslist *item,char *listpath)
uifc.msg("Cannot edit system BBS list");
return(0);
}
opt[8][0]=0;
opt[9][0]=0;
if((listfile=fopen(listpath,"r"))!=NULL) {
inifile=iniReadFile(listfile);
fclose(listfile);
......@@ -108,14 +109,15 @@ int edit_list(struct bbslist *item,char *listpath)
else
return(0);
for(;;) {
sprintf(opt[0],"BBS Name: %s",item->name);
sprintf(opt[1],"Address: %s",item->addr);
sprintf(opt[2],"Port: %hu",item->port);
sprintf(opt[3],"Username: %s",item->user);
sprintf(opt[0],"BBS Name: %s",item->name);
sprintf(opt[1],"Address: %s",item->addr);
sprintf(opt[2],"Port: %hu",item->port);
sprintf(opt[3],"Username: %s",item->user);
sprintf(opt[4],"Password");
sprintf(opt[5],"Connection: %s",conn_types[item->conn_type]);
sprintf(opt[6],"Reversed: %s",item->reversed?"Yes":"No");
sprintf(opt[7],"Screen Mode: %s",screen_modes[item->screen_mode]);
sprintf(opt[5],"Connection: %s",conn_types[item->conn_type]);
sprintf(opt[6],"Reversed: %s",item->reversed?"Yes":"No");
sprintf(opt[7],"Screen Mode: %s",screen_modes[item->screen_mode]);
sprintf(opt[8],"Hide Status Line: %s",item->nostatus?"Yes":"No");
uifc.changes=0;
uifc.helpbuf= "`Edit BBS`\n\n"
......@@ -190,6 +192,11 @@ int edit_list(struct bbslist *item,char *listpath)
changed=1;
iniSetInteger(&inifile,item->name,"ScreenMode",item->screen_mode,NULL);
break;
case 8:
item->nostatus=!item->nostatus;
changed=1;
iniSetBool(&inifile,item->name,"NoStatus",item->nostatus,NULL);
break;
}
if(uifc.changes)
changed=1;
......@@ -367,30 +374,28 @@ struct bbslist *show_bbslist(int mode, char *path)
:CONN_TYPE_RAW-1);
uifc.list(WIN_MID|WIN_SAV,0,0,0,&list[listcount-1]->conn_type,NULL,"Connection Type",&conn_types[1]);
list[listcount-1]->conn_type++;
if(list[listcount-1]->conn_type==CONN_TYPE_RLOGIN) {
uifc.helpbuf= "`Username`\n\n"
"Enter the username to attempt auto-login to the remote with.";
uifc.input(WIN_MID|WIN_SAV,0,0,"User Name",list[listcount-1]->user,MAX_USER_LEN,K_EDIT);
uifc.helpbuf= "`Password`\n\n"
"Enter your password for auto-login.";
uifc.input(WIN_MID|WIN_SAV,0,0,"Password",list[listcount-1]->password,MAX_PASSWD_LEN,K_EDIT);
uifc.helpbuf= "`Reversed`\n\n"
"Select this option if you wish to send the username and password in the wrong\n"
"order (usefull for connecting to v3.11 and lower systems with the default"
"config)";
list[listcount-1]->reversed=1;
uifc.list(WIN_MID|WIN_SAV,0,0,0,&list[listcount-1]->reversed,NULL,"Reversed",YesNo);
list[listcount-1]->reversed=!list[listcount-1]->reversed;
}
else {
list[listcount-1]->user[0]=0;
list[listcount-1]->password[0]=0;
list[listcount-1]->reversed=0;
}
uifc.helpbuf= "`Username`\n\n"
"Enter the username to attempt auto-login to the remote with.";
uifc.input(WIN_MID|WIN_SAV,0,0,"User Name",list[listcount-1]->user,MAX_USER_LEN,K_EDIT);
uifc.helpbuf= "`Password`\n\n"
"Enter your password for auto-login.";
uifc.input(WIN_MID|WIN_SAV,0,0,"Password",list[listcount-1]->password,MAX_PASSWD_LEN,K_EDIT);
uifc.helpbuf= "`Reversed`\n\n"
"Select this option if you wish to send the username and password in the wrong\n"
"order (usefull for connecting to v3.11 and lower systems with the default"
"config)";
list[listcount-1]->reversed=1;
uifc.list(WIN_MID|WIN_SAV,0,0,0,&list[listcount-1]->reversed,NULL,"Reversed",YesNo);
list[listcount-1]->reversed=!list[listcount-1]->reversed;
uifc.helpbuf= "`Screen Mode`\n\n"
"Select the screen size for this connection\n";
list[listcount-1]->screen_mode=SCREEN_MODE_CURRENT;
uifc.list(WIN_MID|WIN_SAV,0,0,0,&list[listcount-1]->screen_mode,NULL,"Screen Mode",screen_modes);
uifc.helpbuf= "`Hide Status Line`\n\n"
"Select this option if you wish to hide the status line, effectively adding\n"
"an extra line to the display (May cause problems with some BBS software)\n";
list[listcount-1]->nostatus=1;
uifc.list(WIN_MID|WIN_SAV,0,0,0,&list[listcount-1]->reversed,NULL,"Hide Status Lines",YesNo);
add_bbs(listpath,list[listcount-1]);
sort_list(list);
for(j=0;list[j]->name[0];j++) {
......
......@@ -42,6 +42,7 @@ struct bbslist {
int id;
int reversed;
int screen_mode;
int nostatus;
};
struct bbslist *show_bbslist(int mode,char *path);
......
......@@ -9,6 +9,7 @@
#include "bbslist.h"
#include "conn.h"
#include "term.h"
#include "uifcinit.h"
#ifdef _WINSOCKAPI_
......@@ -261,6 +262,7 @@ int main(int argc, char **argv)
}
sprintf(str,"SyncTERM - %s",bbs->name);
settitle(str);
term.nostatus=bbs->nostatus;
if(drawwin())
return(1);
doterm(bbs);
......
......@@ -8,6 +8,7 @@ struct terminal {
int width;
int x;
int y;
int nostatus;
};
extern struct terminal term;
......
......@@ -14,7 +14,10 @@ int drawwin(void)
strcpy(str,"SyncTERM ");
gettextinfo(&txtinfo);
term.width=80;
term.height=txtinfo.screenheight-1;
if(term.nostatus)
term.height=txtinfo.screenheight;
else
term.height=txtinfo.screenheight-1;
if(term.height<24)
term.height=24;
term.x=(txtinfo.screenwidth-term.width)/2+2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment