-
Notifications
You must be signed in to change notification settings - Fork 0
/
MailDataDefs.c
216 lines (139 loc) · 4.86 KB
/
MailDataDefs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/*
Copyright 2001-2018 John Wiseman G8BPQ
This file is part of LinBPQ/BPQ32.
LinBPQ/BPQ32 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LinBPQ/BPQ32 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
*/
#include "BPQMail.h"
int LastVer[4] = {0, 0, 0, 0}; // In case we need to do somthing the first time a version is run
HWND MainWnd;
HWND hWndSess;
RECT MainRect;
HMENU hActionMenu;
static HMENU hMenu;
HMENU hDisMenu; // Disconnect Menu Handle
HMENU hFWDMenu; // Forward Menu Handle
int SessX, SessY, SessWidth; // Params for Session Window
char szBuff[80];
#define MaxSockets 64
ConnectionInfo Connections[MaxSockets+1];
struct SEM ChatSemaphore = {0, 0};
struct SEM AllocSemaphore = {0, 0};
struct SEM ConSemaphore = {0, 0};
struct SEM Semaphore = {0, 0};
struct SEM OutputSEM = {0, 0};
struct UserInfo ** UserRecPtr=NULL;
int NumberofUsers=0;
struct UserInfo * BBSChain = NULL; // Chain of users that are BBSes
struct MsgInfo ** MsgHddrPtr=NULL;
int NumberofMessages=0;
int FirstMessageIndextoForward = 0; // Lowest Message wirh a forward bit set - limits search
BIDRec ** BIDRecPtr=NULL;
int NumberofBIDs=0;
BIDRec ** TempBIDRecPtr=NULL;
int NumberofTempBIDs=0;
WPRec ** WPRecPtr=NULL;
int NumberofWPrecs=0;
char ** BadWords=NULL;
int NumberofBadWords=0;
char * BadFile = NULL;
int LatestMsg = 0;
struct SEM MsgNoSemaphore = {0, 0}; // For locking updates to LatestMsg
int HighestBBSNumber = 0;
int MaxMsgno = 60000;
int BidLifetime = 60;
int MaxAge = 30;
int MaintInterval = 24;
int MaintTime = 0;
int UserLifetime = 0;
BOOL cfgMinToTray;
BOOL DisconnectOnClose=FALSE;
char PasswordMsg[100]="Password:";
char cfgHOSTPROMPT[100];
char cfgCTEXT[100];
char cfgLOCALECHO[100];
char AttemptsMsg[] = "Too many attempts - Disconnected\r\r";
char disMsg[] = "Disconnected by SYSOP\r\r";
char LoginMsg[]="user:";
char BlankCall[]=" ";
ULONG BBSApplMask;
ULONG ChatApplMask;
int BBSApplNum=0;
int ChatApplNum=0;
//int StartStream=0;
int NumberofStreams=0;
int MaxStreams=0;
char BBSSID[]="[%s%d.%d.%d.%d-%s%s%s%sIHJM$]\r";
char ChatSID[]="[BPQChatServer-%d.%d.%d.%d]\r";
char NewUserPrompt[100]="Please enter your Name\r>\r";
char * WelcomeMsg = NULL;
char * NewWelcomeMsg = NULL;
char * ExpertWelcomeMsg = NULL;
char * Prompt = NULL;
char * NewPrompt = NULL;
char * ExpertPrompt = NULL;
char BBSName[100] = "NOCALL";
char SYSOPCall[50];
char MailForText[100];
char HRoute[100];
char AMPRDomain[100];
BOOL SendAMPRDirect = 0;
char SignoffMsg[100];
char AbortedMsg[100]="\rOutput aborted\r";
char UserDatabaseName[MAX_PATH] = "BPQBBSUsers.dat";
char UserDatabasePath[MAX_PATH];
char MsgDatabasePath[MAX_PATH];
char MsgDatabaseName[MAX_PATH] = "DIRMES.SYS";
char BIDDatabasePath[MAX_PATH];
char BIDDatabaseName[MAX_PATH] = "WFBID.SYS";
char WPDatabasePath[MAX_PATH];
char WPDatabaseName[MAX_PATH] = "WP.SYS";
char BadWordsPath[MAX_PATH];
char BadWordsName[MAX_PATH] = "BADWORDS.SYS";
char NTSAliasesPath[MAX_PATH];
char NTSAliasesName[MAX_PATH] = "INTRCPT.APS";
char ConfigName[250];
char ChatConfigName[250];
BOOL UsingingRegConfig = FALSE;
BOOL MulticastRX = FALSE;
char BaseDir[MAX_PATH];
char BaseDirRaw[MAX_PATH]; // As set in registry - may contain %NAME%
char ProperBaseDir[MAX_PATH]; // BPQ Directory/BPQMailChat
char MailDir[MAX_PATH];
char RlineVer[50];
BOOL KISSOnly = FALSE;
BOOL EnableUI = FALSE;
BOOL RefuseBulls = FALSE;
BOOL SendSYStoSYSOPCall = FALSE;
BOOL SendBBStoSYSOPCall = FALSE;
BOOL DontHoldNewUsers = FALSE;
BOOL ForwardToMe = FALSE;
BOOL DontNeedHomeBBS = FALSE;
// Send WP Params
BOOL SendWP;
BOOL FilterWPBulls;
BOOL NoWPGuesses;
char SendWPVIA[81];
char SendWPTO[11];
char ** SendWPAddrs; // Replacers WP To and VIA
int SendWPType;
int SMTPMsgs;
int MailForInterval = 0;
char zeros[NBMASK]; // For forward bitmask tests
time_t MaintClock; // Time to run housekeeping
struct MsgInfo * MsgnotoMsg[100000]; // Message Number to Message Slot List.
// Filter Params
char ** RejFrom; // Reject on FROM Call
char ** RejTo; // Reject on TO Call
char ** RejAt; // Reject on AT Call
char ** HoldFrom; // Hold on FROM Call
char ** HoldTo; // Hold on TO Call
char ** HoldAt; // Hold on AT Call