Updates for newsgroup names
This commit is contained in:
parent
1e002f4cb4
commit
3cb9d2a1e4
14
lib/dbftn.c
14
lib/dbftn.c
@ -97,3 +97,17 @@ int SearchFidonet(unsigned short zone)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
char *GetFidoDomain(unsigned short zone)
|
||||||
|
{
|
||||||
|
static char domain[9];
|
||||||
|
|
||||||
|
memset(&domain, 0, sizeof(domain));
|
||||||
|
|
||||||
|
if (SearchFidonet(zone) == FALSE)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
strncpy(domain, fidonet.domain, 8);
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ char fidonet_fil[81];/* Fidonet database filename */
|
|||||||
int InitFidonet(void); /* Initialize fidonet database */
|
int InitFidonet(void); /* Initialize fidonet database */
|
||||||
int TestFidonet(unsigned short); /* Test if zone is in memory */
|
int TestFidonet(unsigned short); /* Test if zone is in memory */
|
||||||
int SearchFidonet(unsigned short); /* Search specified zone and load */
|
int SearchFidonet(unsigned short); /* Search specified zone and load */
|
||||||
|
char *GetFidoDomain(unsigned short); /* Search Fidonet domain name */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ mbftoberep.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfuti
|
|||||||
mbfmove.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfutil.h mbfmove.h
|
mbfmove.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfutil.h mbfmove.h
|
||||||
mbfdel.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfutil.h mbfmove.h
|
mbfdel.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfutil.h mbfmove.h
|
||||||
bounce.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h sendmail.h postnetmail.h ping.h
|
bounce.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h sendmail.h postnetmail.h ping.h
|
||||||
createm.o: ../config.h ../lib/mbselib.h ../lib/msg.h mgrutil.h createm.h
|
createm.o: ../config.h ../lib/mbselib.h ../lib/msg.h ../lib/users.h ../lib/mbsedb.h mgrutil.h createm.h
|
||||||
createf.o: ../config.h ../lib/mbselib.h mgrutil.h createf.h
|
createf.o: ../config.h ../lib/mbselib.h mgrutil.h createf.h
|
||||||
msgflags.o: ../config.h ../lib/mbselib.h msgflags.h
|
msgflags.o: ../config.h ../lib/mbselib.h msgflags.h
|
||||||
dirsession.o: ../config.h ../lib/mbselib.h dirsession.h
|
dirsession.o: ../config.h ../lib/mbselib.h dirsession.h
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "../lib/mbselib.h"
|
#include "../lib/mbselib.h"
|
||||||
#include "../lib/msg.h"
|
#include "../lib/msg.h"
|
||||||
|
#include "../lib/users.h"
|
||||||
|
#include "../lib/mbsedb.h"
|
||||||
#include "mgrutil.h"
|
#include "mgrutil.h"
|
||||||
#include "createm.h"
|
#include "createm.h"
|
||||||
|
|
||||||
@ -250,7 +252,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
|
|||||||
if (tag[i] == '.')
|
if (tag[i] == '.')
|
||||||
tag[i] = '/';
|
tag[i] = '/';
|
||||||
sprintf(msgs.Base, "%s/%s", mgroup.BasePath, tag);
|
sprintf(msgs.Base, "%s/%s", mgroup.BasePath, tag);
|
||||||
sprintf(msgs.Newsgroup, "%s.%s", msgs.Group, tag);
|
sprintf(msgs.Newsgroup, "%s.%s", GetFidoDomain(msgs.Aka.zone), tag);
|
||||||
for (i = 0; i < strlen(msgs.Newsgroup); i++) {
|
for (i = 0; i < strlen(msgs.Newsgroup); i++) {
|
||||||
msgs.Newsgroup[i] = tolower(msgs.Newsgroup[i]);
|
msgs.Newsgroup[i] = tolower(msgs.Newsgroup[i]);
|
||||||
if (msgs.Newsgroup[i] == '/')
|
if (msgs.Newsgroup[i] == '/')
|
||||||
|
@ -35,8 +35,22 @@
|
|||||||
|
|
||||||
void command_list(char *cmd)
|
void command_list(char *cmd)
|
||||||
{
|
{
|
||||||
|
FILE *fp;
|
||||||
|
char *temp;
|
||||||
|
|
||||||
send_nntp("215 List of newsgroups follows");
|
send_nntp("215 List of newsgroups follows");
|
||||||
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
|
sprintf(temp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
|
if ((fp = fopen(temp, "r"))) {
|
||||||
|
fread(&msgshdr, sizeof(msgshdr), 1, fp);
|
||||||
|
while (fread(&msgs, msgshdr.recsize, 1, fp) == 1) {
|
||||||
|
|
||||||
|
fseek(fp, msgs.syssize, SEEK_CUR);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WriteError("$Can't open %s", temp);
|
||||||
|
}
|
||||||
|
free(temp);
|
||||||
send_nntp(".");
|
send_nntp(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ grlist.o: ../config.h ../lib/mbselib.h screen.h grlist.h ledit.h
|
|||||||
m_domain.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h m_global.h m_menu.h m_domain.h
|
m_domain.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h m_global.h m_menu.h m_domain.h
|
||||||
m_fgroup.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_node.h m_archive.h m_ngroup.h m_ticarea.h m_fgroup.h
|
m_fgroup.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_node.h m_archive.h m_ngroup.h m_ticarea.h m_fgroup.h
|
||||||
m_lang.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_lang.h
|
m_lang.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h m_lang.h
|
||||||
m_marea.o: ../config.h ../lib/mbselib.h ../lib/msg.h screen.h mutil.h ledit.h grlist.h m_global.h m_node.h m_mgroup.h m_marea.h
|
m_marea.o: ../config.h ../lib/mbselib.h ../lib/msg.h ../lib/mbsedb.h screen.h mutil.h ledit.h grlist.h m_global.h m_node.h m_mgroup.h m_marea.h
|
||||||
m_new.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h grlist.h m_new.h m_lang.h m_marea.h m_ngroup.h
|
m_new.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h m_global.h grlist.h m_new.h m_lang.h m_marea.h m_ngroup.h
|
||||||
m_protocol.o: ../config.h ../lib/mbselib.h ../paths.h screen.h mutil.h ledit.h stlist.h m_global.h m_protocol.h
|
m_protocol.o: ../config.h ../lib/mbselib.h ../paths.h screen.h mutil.h ledit.h stlist.h m_global.h m_protocol.h
|
||||||
m_ticarea.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h grlist.h m_global.h m_node.h m_fgroup.h m_farea.h m_archive.h m_ticarea.h
|
m_ticarea.o: ../config.h ../lib/mbselib.h screen.h mutil.h ledit.h stlist.h grlist.h m_global.h m_node.h m_fgroup.h m_farea.h m_archive.h m_ticarea.h
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "../lib/mbselib.h"
|
#include "../lib/mbselib.h"
|
||||||
#include "../lib/msg.h"
|
#include "../lib/msg.h"
|
||||||
|
#include "../lib/users.h"
|
||||||
|
#include "../lib/mbsedb.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "mutil.h"
|
#include "mutil.h"
|
||||||
#include "ledit.h"
|
#include "ledit.h"
|
||||||
@ -190,6 +192,7 @@ int OpenMsgarea(void)
|
|||||||
start = SYSINFO.StartDate;
|
start = SYSINFO.StartDate;
|
||||||
fclose(fin);
|
fclose(fin);
|
||||||
}
|
}
|
||||||
|
InitFidonet();
|
||||||
|
|
||||||
sprintf(fnin, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
sprintf(fnin, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||||
sprintf(fnout, "%s/etc/mareas.temp", getenv("MBSE_ROOT"));
|
sprintf(fnout, "%s/etc/mareas.temp", getenv("MBSE_ROOT"));
|
||||||
@ -241,7 +244,7 @@ int OpenMsgarea(void)
|
|||||||
if ((int)msgs.Created == 0) {
|
if ((int)msgs.Created == 0) {
|
||||||
msgs.Created = start;
|
msgs.Created = start;
|
||||||
if ((strlen(msgs.Newsgroup) == 0) && (msgs.Type == ECHOMAIL) && strlen(msgs.Group)) {
|
if ((strlen(msgs.Newsgroup) == 0) && (msgs.Type == ECHOMAIL) && strlen(msgs.Group)) {
|
||||||
sprintf(msgs.Newsgroup, "%s.%s", msgs.Group, msgs.Tag);
|
sprintf(msgs.Newsgroup, "%s.%s", GetFidoDomain(msgs.Aka.zone), msgs.Tag);
|
||||||
for (i = 0; i < strlen(msgs.Newsgroup); i++) {
|
for (i = 0; i < strlen(msgs.Newsgroup); i++) {
|
||||||
msgs.Newsgroup[i] = tolower(msgs.Newsgroup[i]);
|
msgs.Newsgroup[i] = tolower(msgs.Newsgroup[i]);
|
||||||
if (msgs.Newsgroup[i] == '_')
|
if (msgs.Newsgroup[i] == '_')
|
||||||
|
Reference in New Issue
Block a user