コード例 #1
0
ファイル: cconfmysql.cpp プロジェクト: Verlihub/verlihub
bool cConfMySQL::UpdatePKVar(const char *field)
{
	cConfigItemBase *item = operator[](field);

	if (!item)
		return false;

	return UpdatePKVar(item);
}
コード例 #2
0
ファイル: cconfmysql.cpp プロジェクト: Verlihub/verlihub
bool cConfMySQL::UpdatePKVar(const char* var_name, string &new_val)
{
	cConfigItemBase * item = NULL;
	string var(var_name);
	item = operator[](var);

	if (!item)
		return false;

	LoadPK();
	item->ConvertFrom(new_val);
	return UpdatePKVar(item);
}
コード例 #3
0
ファイル: creglist.cpp プロジェクト: Gerlofius/verlihub-1.0.0
/** log that user logged in */
bool cRegList::Logout(const string &nick)
{
	if(!FindRegInfo(mModel, nick)) return false;
	mModel.mLogoutLast = cTime().Sec()-1; // this is a patch for users that connect twice
	return UpdatePKVar("logout_last");
}
コード例 #4
0
ファイル: creglist.cpp プロジェクト: Gerlofius/verlihub-1.0.0
/** No descriptions */
bool cRegList::SetVar(const string &nick, string &field, string &value)
{
	SetBaseTo(&mModel);
	mModel.mNick = nick; //@todo nick2dbkey
	return UpdatePKVar(field.c_str(), value);
}