diff options
author | maanuel <none@none> | 2009-12-20 23:21:31 -0300 |
---|---|---|
committer | maanuel <none@none> | 2009-12-20 23:21:31 -0300 |
commit | cca69e1c7d6c049751a1be42d664d5614ab9c3bc (patch) | |
tree | 09bd37b7ade56a7f7adb5c3e759d35cbe7c97dc9 /src/trinityrealm/AuthCodes.cpp | |
parent | af83219083a2473068eb17092f9933247eace9f7 (diff) | |
parent | 0e8dd6d97e015340f3f1ccb7be30d9f0c22b46bb (diff) |
Merge
--HG--
branch : trunk
Diffstat (limited to 'src/trinityrealm/AuthCodes.cpp')
-rw-r--r-- | src/trinityrealm/AuthCodes.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/trinityrealm/AuthCodes.cpp b/src/trinityrealm/AuthCodes.cpp new file mode 100644 index 00000000000..812949e0823 --- /dev/null +++ b/src/trinityrealm/AuthCodes.cpp @@ -0,0 +1,37 @@ +#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)); +} + +}; |