-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathAcceptIp.cpp
More file actions
86 lines (69 loc) · 1.18 KB
/
AcceptIp.cpp
File metadata and controls
86 lines (69 loc) · 1.18 KB
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
// ------------------------------
// Decompiled by Deathway
// Date : 2007-03-09
// ------------------------------
// GS-N 0.99.60T 0x00482ED0 Completed
// GS-N 1.00.18 0x0049E440 JPN - Completed
#include "stdafx.h"
#include "AcceptIp.h"
#include "GameMain.h"
#include "logproc.h"
#include "..\include\readscript.h"
CAcceptIp acceptIP;
CAcceptIp::CAcceptIp()
{
this->Init();
}
CAcceptIp::~CAcceptIp()
{
return;
}
void CAcceptIp::Init()
{
for (int n=0; n<MAX_USE_IP;n++)
{
memset(this->szIp[n] , 0, sizeof(szIp[n]) );
this->UseIp[n]= false;
}
}
BOOL CAcceptIp::IsIp(LPSTR ip)
{
for(int n=0;n<MAX_USE_IP;n++)
{
if ( this->UseIp[n] != false )
{
if ( strcmp(this->szIp[n], ip)== 0 )
{
return TRUE;
}
}
}
return FALSE;
}
void CAcceptIp::Load(LPSTR filename)
{
int count=0;
int Token;
SMDFile=fopen(filename, "r");
if (SMDFile == NULL)
{
MsgBox(lMsg.Get(MSGGET(0, 112)), filename);
return;
}
while ( true )
{
Token=GetToken();
if (Token == END)
{
break;
}
if ( Token == NAME )
{
strcpy(this->szIp[count] , TokenString);
this->UseIp[count] = true;
count++;
}
}
fclose(SMDFile);
LogAdd(lMsg.Get(MSGGET(1, 164)), count);
}