aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Authentication/AuthCodes.cpp
blob: 01ead12a582f5dbb5cd559296b6194c427925ed8 (plain)
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
#include "AuthCodes.h"

namespace AuthHelper
{

bool IsPreBCAcceptedClientBuild(int build)
{
    int accepted_versions[] = PRE_BC_ACCEPTED_CLIENT_BUILD;

    for (int i = 0; accepted_versions[i]; ++i)
        if (build == accepted_versions[i])
            return true;

    return false;
}

bool IsPostBCAcceptedClientBuild(int build)
{
    int accepted_versions[] = POST_BC_ACCEPTED_CLIENT_BUILD;

    for (int i = 0; accepted_versions[i]; ++i)
        if (build == accepted_versions[i])
            return true;

    return false;
}

bool IsAcceptedClientBuild(int build)
{
    return (IsPostBCAcceptedClientBuild(build) || IsPreBCAcceptedClientBuild(build));
}

};