aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Authentication/AuthCodes.cpp
blob: 59969670921eb04979acfb9f493d819747f0f4f7 (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
#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));
    }
};