From: Naffanya Date: Tue, 28 Jan 2014 22:43:00 +0000 (+0200) Subject: Rename parameter's names X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/67eb91cd2fafdf89ba670706e684ab0cd74ae513?ds=sidebyside;hp=de673871df0a5f56ce8c8ee1c075eb405b019f70 Rename parameter's names --- diff --git a/projects/stargazer/plugins/other/rscript/rscript.h b/projects/stargazer/plugins/other/rscript/rscript.h index 003aac2d..bc6aa92f 100644 --- a/projects/stargazer/plugins/other/rscript/rscript.h +++ b/projects/stargazer/plugins/other/rscript/rscript.h @@ -213,7 +213,6 @@ private: std::vector IP2Routers(uint32_t ip); bool GetUsers(); -// std::string GetUserParam(USER_PTR u, const std::string & paramName) const; void SetUserNotifiers(USER_PTR u); void UnSetUserNotifiers(USER_PTR u); diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 63af98e1..fff3f58d 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1481,9 +1481,10 @@ std::string USER_IMPL::GetParamValue(const std::string & name) const return stream.str(); } if (name == "login") return login; - if (name == "ip") return currIP.ToString(); + if (name == "currIP") return currIP.ToString(); if (name == "enabledDirs") return GetEnabledDirs(); - if (property.Exists(name)) return property.GetPropertyValue(name); + if (property.Exists(name)) + return property.GetPropertyValue(name); else { WriteServLog("User’s parameter '%s' does not exist.", name.c_str()); diff --git a/projects/stargazer/user_impl.h b/projects/stargazer/user_impl.h index eacf91ee..38d3c013 100644 --- a/projects/stargazer/user_impl.h +++ b/projects/stargazer/user_impl.h @@ -211,7 +211,6 @@ public: void ProcessNewMonth(); bool IsInetable(); - std::string GetEnabledDirs() const; void OnAdd(); diff --git a/projects/stargazer/user_property.cpp b/projects/stargazer/user_property.cpp index 1bb6c51c..a94b60a4 100644 --- a/projects/stargazer/user_property.cpp +++ b/projects/stargazer/user_property.cpp @@ -28,7 +28,7 @@ USER_PROPERTIES::USER_PROPERTIES(const std::string & sd) realName (conf.realName, "realName", false, false, GetStgLogger(), sd, properties), credit (conf.credit, "credit", false, false, GetStgLogger(), sd, properties), creditExpire(conf.creditExpire, "creditExpire", false, false, GetStgLogger(), sd, properties), - ips (conf.ips, "IP", false, false, GetStgLogger(), sd, properties), + ips (conf.ips, "ips", false, false, GetStgLogger(), sd, properties), userdata0 (conf.userdata[0], "userdata0", false, false, GetStgLogger(), sd, properties), userdata1 (conf.userdata[1], "userdata1", false, false, GetStgLogger(), sd, properties), userdata2 (conf.userdata[2], "userdata2", false, false, GetStgLogger(), sd, properties),