X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/31b24cededa8b07468cb5e1c49b2a208fe19173e..de673871df0a5f56ce8c8ee1c075eb405b019f70:/projects/stargazer/user_impl.cpp?ds=sidebyside diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 51637a1b..63af98e1 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1474,24 +1474,21 @@ while (it != messages.end()) //----------------------------------------------------------------------------- std::string USER_IMPL::GetParamValue(const std::string & name) const { -if (property.Exists(name)) - { if (name == "id") { std::ostringstream stream; stream << id; return stream.str(); } - if (name == "login") return login; - if (name == "ip") return currIP.ToString(); - if (name == "enabledDirs") return GetEnabledDirs(); - return property.GetPropertyValue(name); - } -else - { - WriteServLog("Error getting parametr value", name.c_str()); - return ""; - } + if (name == "login") return login; + if (name == "ip") return currIP.ToString(); + if (name == "enabledDirs") return GetEnabledDirs(); + if (property.Exists(name)) return property.GetPropertyValue(name); + else + { + WriteServLog("User’s parameter '%s' does not exist.", name.c_str()); + return ""; + } } //----------------------------------------------------------------------------- //-----------------------------------------------------------------------------