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

Increase user's hostname field (aka user_t.comp) from 30 to 60 chars

Many dynamically-generated (e.g residential) hostnames are much > 30
chars. And we can now increase user.tab fields fairly arbitrarily, so
let's. :-)

Also rename LEN_COMP to LEN_HOST. Some day I'll change all the user_t
comp references to 'host', but not today.
parent 9d58ae1f
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3858 passed
......@@ -1645,7 +1645,7 @@ int sbbs_t::exec(csi_t *csi)
csi->logic=LOGIC_TRUE;
break;
case USER_STRING_COMPUTER:
sprintf(useron.comp,"%.*s",LEN_COMP,csi->str);
SAFECOPY(useron.comp, csi->str);
putuserstr(useron.number, USER_HOST
,useron.comp);
csi->logic=LOGIC_TRUE;
......
......@@ -516,7 +516,7 @@ typedef enum { /* Values for xtrn_t.event */
#define LEN_NAME 25 /* User name */
#define LEN_HANDLE 8 /* User chat handle */
#define LEN_NOTE 30 /* User note */
#define LEN_COMP 30 /* User computer description */
#define LEN_HOST 60 /* User hostname */
#define LEN_COMMENT 60 /* User comment */
#define LEN_NETMAIL 60 /* NetMail forwarding address */
#define LEN_PHONE 12 /* User phone number */
......@@ -920,7 +920,7 @@ typedef struct { /* Users information */
char alias[LEN_ALIAS+1], /* Alias */
name[LEN_NAME+1], /* Name - Real */
handle[LEN_HANDLE+1], /* Chat handle */
comp[LEN_COMP+1], /* Computer type */
comp[LEN_HOST+1], /* Hostname */
note[LEN_NOTE+1], /* Public notice about this user */
address[LEN_ADDRESS+1], /* Street Address */
location[LEN_LOCATION+1], /* Location of user */
......
......@@ -1533,7 +1533,7 @@ int edit_personal(scfg_t *cfg, user_t *user)
case 10:
/* Host Name */
GETUSERDAT(cfg,user);
uifc.input(WIN_MID|WIN_ACT|WIN_SAV,0,0,"Host Name",user->comp,LEN_COMP,K_EDIT);
uifc.input(WIN_MID|WIN_ACT|WIN_SAV,0,0,"Hostname",user->comp,LEN_HOST,K_EDIT);
if(uifc.changes)
putuserstr(cfg, user->number, USER_HOST, user->comp);
break;
......
......@@ -192,7 +192,7 @@ void sbbs_t::useredit(int usernumber)
break;
case 'C':
bputs(text[EnterYourComputer]);
getstr(user.comp,LEN_COMP,kmode);
getstr(user.comp,LEN_HOST,kmode);
if(sys_status&SS_ABORT)
break;
putuserstr(user.number, USER_HOST, user.comp);
......
......@@ -458,7 +458,7 @@ void __fastcall TMainForm::FormShow(TObject *Sender)
NameEdit->MaxLength = LEN_NAME;
PhoneEdit->MaxLength = LEN_PHONE;
HandleEdit->MaxLength = LEN_HANDLE;
ComputerEdit->MaxLength = LEN_COMP;
ComputerEdit->MaxLength = LEN_HOST;
NetMailEdit->MaxLength = LEN_NETMAIL;
NoteEdit->MaxLength = LEN_NOTE;
AddressEdit->MaxLength = LEN_ADDRESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment