From e2a62732f504cca5db8fb8d6d38ca64dfd4b92ac Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 28 Nov 2024 22:33:53 +0000 Subject: New upstream version 6.0.24.51 --- BBSUtilities.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 75 insertions(+), 5 deletions(-) (limited to 'BBSUtilities.c') diff --git a/BBSUtilities.c b/BBSUtilities.c index 82344bd..56e08a0 100644 --- a/BBSUtilities.c +++ b/BBSUtilities.c @@ -5566,14 +5566,19 @@ BOOL CreateMessage(CIRCUIT * conn, char * From, char * ToCall, char * ATBBS, cha { if (_memicmp(ToCall, "rms:", 4) == 0) { - if (!FindRMS()) + // Could be ampr.org message + + if (!isAMPRMsg(ToCall)) { - nodeprintf(conn, "*** Error - Forwarding via RMS is not configured on this BBS\r"); - return FALSE; + if (!FindRMS()) + { + nodeprintf(conn, "*** Error - Forwarding via RMS is not configured on this BBS\r"); + return FALSE; + } } - via=strlop(ToCall, ':'); _strupr(ToCall); + } else if (_memicmp(ToCall, "rms/", 4) == 0) { @@ -6877,7 +6882,7 @@ int CountMessagestoForward (struct UserInfo * user) if ((Msg->status != 'H') && (Msg->status != 'D') && Msg->type && check_fwd_bit(Msg->fbbs, BBSNumber)) { n++; - continue; // So we dont count twice in Flag set and NTS MPS + continue; // So we dont count twice if Flag set and NTS MPS } // if an NTS MPS, also check for any matches @@ -6918,6 +6923,66 @@ int CountMessagestoForward (struct UserInfo * user) return n; } +int CountBytestoForward (struct UserInfo * user) +{ + // See if any messages are queued for this BBS. If so return total bytes queued + + int m, n=0; + struct MsgInfo * Msg; + int BBSNumber = user->BBSNumber; + int FirstMessage = FirstMessageIndextoForward; + + if ((user->flags & F_NTSMPS)) + FirstMessage = 1; + + for (m = FirstMessage; m <= NumberofMessages; m++) + { + Msg=MsgHddrPtr[m]; + + if ((Msg->status != 'H') && (Msg->status != 'D') && Msg->type && check_fwd_bit(Msg->fbbs, BBSNumber)) + { + n += Msg->length; + continue; // So we dont count twice if Flag set and NTS MPS + } + + // if an NTS MPS, also check for any matches + + if (Msg->type == 'T' && (user->flags & F_NTSMPS)) + { + struct BBSForwardingInfo * ForwardingInfo = user->ForwardingInfo; + int depth; + + if (Msg->status == 'N' && ForwardingInfo) + { + depth = CheckBBSToForNTS(Msg, ForwardingInfo); + + if (depth > -1 && Msg->Locked == 0) + { + n += Msg->length; + continue; + } + depth = CheckBBSAtList(Msg, ForwardingInfo, Msg->via); + + if (depth && Msg->Locked == 0) + { + n += Msg->length; + continue; + } + + depth = CheckBBSATListWildCarded(Msg, ForwardingInfo, Msg->via); + + if (depth > -1 && Msg->Locked == 0) + { + n += Msg->length; + continue; + } + } + } + } + + return n; +} + int ListMessagestoForward(CIRCUIT * conn, struct UserInfo * user) { // See if any messages are queued for this BBS @@ -15823,6 +15888,11 @@ void SendMessageReadEvent(char * call, struct MsgInfo * Msg) } } +void SendMessageForwardedToM0LTE(char * call, struct MsgInfo * Msg) +{ +} + + void SendNewMessageEvent(char * call, struct MsgInfo * Msg) { if (reportMailEvents) -- cgit v1.2.3