diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-07-07 16:06:15 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-07-07 16:06:15 +0100 |
| commit | ca2a16b7fcd90dde6850cf653a7fda28e1d3a3e2 (patch) | |
| tree | 90e519cf2e49b73852249b36286d282eb5bfb1f6 /BBSUtilities.c | |
| parent | d122a87dd1598428509fdad64dacf64f1cc1f4dd (diff) | |
| parent | 766bbe358d961346b239ffe868d1477567046f41 (diff) | |
Update upstream source from tag 'upstream/6.0.24.40'
Update to upstream version '6.0.24.40'
with Debian dir 55828202467302bbb51a2206f19757730eb51642
Diffstat (limited to 'BBSUtilities.c')
| -rw-r--r-- | BBSUtilities.c | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/BBSUtilities.c b/BBSUtilities.c index 6c542ba..d62b3c5 100644 --- a/BBSUtilities.c +++ b/BBSUtilities.c @@ -213,6 +213,7 @@ BOOL UserCantKillT = FALSE; typedef int (WINAPI FAR *FARPROCX)();
FARPROCX pRunEventProgram;
+FARPROCX pGetPortFrequency;
int RunEventProgram(char * Program, char * Param);
@@ -9680,6 +9681,7 @@ VOID SaveConfig(char * ConfigName) SaveIntValue(group, "WarnNoRoute", WarnNoRoute);
SaveIntValue(group, "Localtime", Localtime);
SaveIntValue(group, "SendPtoMultiple", SendPtoMultiple);
+ SaveIntValue(group, "FOURCHARCONT", FOURCHARCONT);
SaveMultiStringValue(group, "FWDAliases", AliasText);
@@ -10116,6 +10118,8 @@ BOOL GetConfig(char * ConfigName) ReaddressReceived = GetIntValue(group, "ReaddressReceived");
WarnNoRoute = GetIntValue(group, "WarnNoRoute");
SendPtoMultiple = GetIntValue(group, "SendPtoMultiple");
+ FOURCHARCONT = GetIntValue(group, "FOURCHARCONT");
+
Localtime = GetIntValue(group, "Localtime");
AliasText = GetMultiStringValue(group, "FWDAliases");
GetStringValue(group, "BBSName", BBSName);
@@ -10588,8 +10592,24 @@ int Connected(int Stream) if (SendNewUserMessage)
{
+ int64_t LongFreq = Freq;
+
char * MailBuffer = malloc(100);
- Length += sprintf(MailBuffer, "New User %s Connected to Mailbox on Port %d Freq %d Mode %d\r\n", callsign, port, Freq, Mode);
+
+ if (Freq == 0 && port)
+ {
+ // Get Port Freq if available
+
+ char FreqString[256];
+
+#ifdef WIN32
+ if (pGetPortFrequency)
+ LongFreq = pGetPortFrequency(port, FreqString);
+#else
+ LongFreq = GetPortFrequency(port, FreqString);
+#endif
+ }
+ Length += sprintf(MailBuffer, "New User %s Connected to Mailbox on Port %d Freq %d Mode %ld\r\n", callsign, port, LongFreq, Mode);
sprintf(Title, "New User %s", callsign);
@@ -11754,9 +11774,8 @@ typedef struct _POPENRET */
void run_pgTimeoutThread( pid_t process )
{
-
- printf("watchdog thread: PID of subprocess: %d\n", process);
- fflush(stdout);
+// printf("watchdog thread: PID of subprocess: %d\n", process);
+// fflush(stdout);
Sleep(5000);
// if still running PID (?) then kill.
if ( getpgid(process) >= 0 )
@@ -11768,10 +11787,8 @@ void run_pgTimeoutThread( pid_t process ) Debugprintf("Failed to kill PG watchdog Process %d", process);
}
-
- Debugprintf("watchdog thread: PID=%d Exit", process);
- fflush(stdout);
- //return;
+// Debugprintf("watchdog thread: PID=%d Exit", process);
+// fflush(stdout);
}
@@ -12638,7 +12655,6 @@ VOID ProcessLine(CIRCUIT * conn, struct UserInfo * user, char* Buffer, int len) #endif
return;
}
-
if (_memicmp(Cmd, "Node", 4) == 0)
{
ExpandAndSendMessage(conn, SignoffMsg, LOG_BBS);
@@ -15757,8 +15773,10 @@ VOID GetPGConfig() strcat(FN, "PG/PGList.txt");
if ((file = fopen(FN, "r")) == NULL)
+ {
return;
-
+ }
+
while(fgets(buf, 255, file) != NULL)
{
if ( buf[0] == '#')
@@ -15785,6 +15803,7 @@ VOID GetPGConfig() break;
}
+
NUM_SERVERS = n;
fclose(file);
|
