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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,9 @@ protected:
|
|||
|
||||
template<class MSGTYPE>
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue