Attempt to add first/last names to bluewave scan
This commit is contained in:
parent
efd022efd8
commit
76de1e7f4b
@ -242,3 +242,4 @@ File exists!\r\n
|
||||
\r\nFirstname may not begin or end with a space\r\n
|
||||
\r\nLastname may not begin or end with a space\r\n
|
||||
\r\nFirst & Last Name combination in use!\r\n
|
||||
\r\nSpaces not allowed\r\n
|
||||
|
@ -61,8 +61,10 @@ int bwave_scan_area(int confr, int area, int areano, int totmsgs, FILE *fti_file
|
||||
struct fido_addr *fido;
|
||||
char *body;
|
||||
struct tm timeStruct;
|
||||
char realname[66];
|
||||
char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
||||
|
||||
snprintf(realname, 65, "%s %s", gUser->firstname, gUser->lastname);
|
||||
if (msghs == NULL) {
|
||||
return totmsgs;
|
||||
}
|
||||
@ -111,7 +113,7 @@ int bwave_scan_area(int confr, int area, int areano, int totmsgs, FILE *fti_file
|
||||
}
|
||||
|
||||
if (msghs->msgs[k]->to != NULL) {
|
||||
if (strcasecmp(msghs->msgs[k]->to, gUser->loginname) == 0) {
|
||||
if (strcasecmp(msghs->msgs[k]->to, gUser->loginname) == 0 || strncasecmp(msghs->msgs[k]->to, realname, 42) == 0) {
|
||||
personal_msgs++;
|
||||
}
|
||||
}
|
||||
@ -246,7 +248,8 @@ void bwave_create_packet() {
|
||||
|
||||
hdr.ver = PACKET_LEVEL;
|
||||
strncpy(hdr.loginname, gUser->loginname, 42);
|
||||
strncpy(hdr.aliasname, gUser->loginname, 42);
|
||||
//strncpy(hdr.aliasname, gUser->loginname, 42);
|
||||
snprintf(hdr.aliasname, 42, "%s %s", gUser->firstname, gUser->lastname);
|
||||
hdr.zone = converts(conf.main_aka->zone);
|
||||
hdr.node = converts(conf.main_aka->node);
|
||||
hdr.net = converts(conf.main_aka->net);
|
||||
|
10
src/users.c
10
src/users.c
@ -655,7 +655,10 @@ struct user_record *new_user() {
|
||||
s_printf(get_string(167));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strchr(buffer, ' ') != NULL) {
|
||||
s_printf(get_string(244));
|
||||
continue;
|
||||
}
|
||||
s_printf("\r\n");
|
||||
user->firstname = strdup(buffer);
|
||||
nameok = 1;
|
||||
@ -674,7 +677,10 @@ struct user_record *new_user() {
|
||||
s_printf(get_string(167));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strchr(buffer, ' ') != NULL) {
|
||||
s_printf(get_string(244));
|
||||
continue;
|
||||
}
|
||||
s_printf("\r\n");
|
||||
nameok = 1;
|
||||
user->lastname = strdup(buffer);
|
||||
|
Reference in New Issue
Block a user