public:
USER_PROPERTIES(const SETTINGS * settings);
+
+ const USER_STAT & GetStat() const { return stat; }
+ const USER_CONF & GetConf() const { return conf; }
+ void SetStat(const USER_STAT & s) { stat = s; }
+ void SetConf(const USER_CONF & c) { conf = c; }
+
+ void SetProperties(const USER_PROPERTIES & p) { stat = p.stat; conf = p.conf; }
+
USER_PROPERTY_LOGGED<double> cash;
USER_PROPERTY_LOGGED<DIR_TRAFF> up;
USER_PROPERTY_LOGGED<DIR_TRAFF> down;
typename set<PROPERTY_NOTIFIER_BASE<varT> *>::iterator ni;
-//printf("USER_PROPERTY<varT>::operator= (const varT& rhs)\n");
-
varT oldVal = value;
ni = beforeNotifiers.begin();
newValue.c_str(),
msg.c_str());
-
-/*char userLogMsg[2048];
-sprintf(userLogMsg, "\'%s\' parameter changed from \'%s\' to \'%s\'. %s",
- parameter.c_str(), oldValue.c_str(),
- newValue.c_str(), msg.c_str());*/
store->WriteUserChgLog(login, admin.GetLogin(), admin.GetAdminIP(), parameter, oldValue, newValue, msg);
-//store->WriteLogString(userLogMsg, login);
}
//-------------------------------------------------------------------------
template <typename varT>
const string & paramName,
const string & oldValue,
const string & newValue,
- const ADMIN &)
+ const ADMIN & admin)
{
string str1;
if (access(str1.c_str(), X_OK) == 0)
{
- string str2("\"" + str1 + "\" \"" + login + "\" \"" + paramName + "\" \"" + oldValue + "\" \"" + newValue + "\"");
+ string str2("\"" + str1 + "\" \"" + login + "\" \"" + paramName + "\" \"" + oldValue + "\" \"" + newValue + "\" \"" + admin.GetLogin() + "\" \"" + admin.GetAdminIPStr() + "\"");
ScriptExec(str2);
}
else