use the cvar bool feature
parent
874ea1b227
commit
f65afec48a
|
@ -35,8 +35,8 @@ EntityId EntityStorage::getUserId(const std::string& user, const std::string& pa
|
||||||
int checkId = pq.loadUser(user, passwd, tmUid);
|
int checkId = pq.loadUser(user, passwd, tmUid);
|
||||||
|
|
||||||
if (checkId == 0) {
|
if (checkId == 0) {
|
||||||
const core::VarPtr& autoReg = core::Var::get("user_auto_register", "yes");
|
const core::VarPtr& autoReg = core::Var::get("sv_autoregister", "true");
|
||||||
if (autoReg->strVal() == "yes") {
|
if (autoReg->boolVal()) {
|
||||||
pq.storeUser(user, passwd, tmUid);
|
pq.storeUser(user, passwd, tmUid);
|
||||||
checkId = pq.loadUser(user, passwd, tmUid);
|
checkId = pq.loadUser(user, passwd, tmUid);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,9 @@ protected:
|
||||||
|
|
||||||
template<class MSGTYPE>
|
template<class MSGTYPE>
|
||||||
inline const MSGTYPE* getMsg(const void *data) const {
|
inline const MSGTYPE* getMsg(const void *data) const {
|
||||||
return static_cast<const MSGTYPE*>(data);
|
const MSGTYPE* msg = static_cast<const MSGTYPE*>(data);
|
||||||
|
// TODO: call verify
|
||||||
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue