From f27daddd1b95616b7e68bc384eeffb3c62e9bdd2 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Sun, 6 Jun 2010 23:08:23 +0200 Subject: * Restructuring authserver and worldserver. --HG-- branch : trunk --- src/server/authserver/Authentication/AuthCodes.cpp | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/server/authserver/Authentication/AuthCodes.cpp (limited to 'src/server/authserver/Authentication/AuthCodes.cpp') diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp new file mode 100644 index 00000000000..812949e0823 --- /dev/null +++ b/src/server/authserver/Authentication/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)); +} + +}; -- cgit v1.2.3