-
Notifications
You must be signed in to change notification settings - Fork 6
/
security.h
42 lines (33 loc) · 1.22 KB
/
security.h
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
/***************************************************************************
security.h - description
-------------------
begin : Tue Apr 3 2001
copyright : (C) 2001 by Alexander Bilichenko
email : [email protected]
***************************************************************************/
#ifndef SECURITY_H_INCLUDED
#define SECURITY_H_INCLUDED
#include "basetypes.h"
// antispam codes
#define POST_MSG 1
#define REFRESH_INDEX 2
#define READ_MSG 3
#define SPAMQUEUE_PREFIX 0
#define SPAMQUEUE_LENGTH 60
#define READQUEUE_PREFIX 60*sizeof(SSpamQueue)
#define READQUEUE_LENGTH 60
struct SSpamQueue
{
DWORD IP; // ip address
time_t Date; // date
};
struct SReadQueue
{
time_t Date; // date
DWORD IP; // IP-address
DWORD MsgIndex; // message index
};
int MarkPostfromIPInvalid(DWORD IP, int TimeInterval);
int CheckPostfromIPValidity(DWORD IP, int TimeInterval);
int CheckReadValidity(DWORD IP, DWORD MsgIndex);
#endif