Added System Name / Architecture to tearline
This commit is contained in:
parent
48c9b8d2e3
commit
82005fe9e2
24
mail_menu.c
24
mail_menu.c
@ -5,6 +5,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <fcntl.h>
|
||||
#include "jamlib/jam.h"
|
||||
#include "bbs.h"
|
||||
@ -273,6 +274,9 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from
|
||||
int i;
|
||||
int j;
|
||||
struct stat s;
|
||||
struct utsname name;
|
||||
|
||||
|
||||
|
||||
if (conf.external_editor_cmd != NULL) {
|
||||
s_putstring(socket, "\r\nUse external editor? (Y/N) ");
|
||||
@ -370,19 +374,21 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from
|
||||
}
|
||||
}
|
||||
|
||||
uname(&name);
|
||||
|
||||
if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_FIDO) {
|
||||
if (conf.mail_conferences[user->cur_mail_conf]->fidoaddr->point == 0) {
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s (%d:%d/%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s (%d:%d/%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node);
|
||||
} else {
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s (%d:%d/%d.%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s (%d:%d/%d.%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->point);
|
||||
}
|
||||
} else {
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s \r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline);
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s \r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline);
|
||||
}
|
||||
body2 = (char *)malloc(totlen + 2 + strlen(buffer));
|
||||
|
||||
@ -425,7 +431,7 @@ char *editor(int socket, struct user_record *user, char *quote, char *from) {
|
||||
int qfrom,qto;
|
||||
int z;
|
||||
char *tagline;
|
||||
|
||||
struct utsname name;
|
||||
char next_line_buffer[80];
|
||||
|
||||
memset(next_line_buffer, 0, 80);
|
||||
@ -487,20 +493,20 @@ char *editor(int socket, struct user_record *user, char *quote, char *from) {
|
||||
} else {
|
||||
tagline = conf.default_tagline;
|
||||
}
|
||||
|
||||
uname(&name);
|
||||
if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_FIDO) {
|
||||
if (conf.mail_conferences[user->cur_mail_conf]->fidoaddr->point == 0) {
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s (%d:%d/%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s (%d:%d/%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node);
|
||||
} else {
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s (%d:%d/%d.%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s (%d:%d/%d.%d)\r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline, conf.mail_conferences[user->cur_mail_conf]->fidoaddr->zone,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->net,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->node,
|
||||
conf.mail_conferences[user->cur_mail_conf]->fidoaddr->point);
|
||||
}
|
||||
} else {
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d (%s)\r * Origin: %s \r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, tagline);
|
||||
snprintf(buffer, 256, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s \r", VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline);
|
||||
}
|
||||
size += 2;
|
||||
size += strlen(buffer);
|
||||
@ -1878,5 +1884,3 @@ void mail_scan(int socket, struct user_record *user) {
|
||||
s_getc(socket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user