From f65afec48ad1b6952b7636f75a1d1666c9864ad8 Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Thu, 31 Mar 2016 19:55:08 +0200 Subject: [PATCH] use the cvar bool feature --- src/modules/backend/entity/EntityStorage.cpp | 4 ++-- src/modules/network/IProtocolHandler.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/backend/entity/EntityStorage.cpp b/src/modules/backend/entity/EntityStorage.cpp index 449d302e9..eb33013e1 100644 --- a/src/modules/backend/entity/EntityStorage.cpp +++ b/src/modules/backend/entity/EntityStorage.cpp @@ -35,8 +35,8 @@ EntityId EntityStorage::getUserId(const std::string& user, const std::string& pa int checkId = pq.loadUser(user, passwd, tmUid); if (checkId == 0) { - const core::VarPtr& autoReg = core::Var::get("user_auto_register", "yes"); - if (autoReg->strVal() == "yes") { + const core::VarPtr& autoReg = core::Var::get("sv_autoregister", "true"); + if (autoReg->boolVal()) { pq.storeUser(user, passwd, tmUid); checkId = pq.loadUser(user, passwd, tmUid); } diff --git a/src/modules/network/IProtocolHandler.h b/src/modules/network/IProtocolHandler.h index 41a9710f2..ebb7c7d20 100644 --- a/src/modules/network/IProtocolHandler.h +++ b/src/modules/network/IProtocolHandler.h @@ -22,7 +22,9 @@ protected: template inline const MSGTYPE* getMsg(const void *data) const { - return static_cast(data); + const MSGTYPE* msg = static_cast(data); + // TODO: call verify + return msg; } public: