From a5ab34fe53b0dca6307703664c6a1bc5bab1bae8 Mon Sep 17 00:00:00 2001 From: Naffanya Date: Sun, 18 Aug 2013 23:22:13 +0300 Subject: [PATCH 1/1] Correcting return in method GetParamValue and cycle in methods OnConnect and OnDisconnect --- projects/stargazer/user_impl.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index d56cd227..52731b7b 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -602,6 +602,7 @@ if (!fakeConnect) while (it != settings->GetScriptParams().end()) { scriptOnConnectParams += " \"" + GetParamValue(it->c_str()) + "\""; + ++it; } ScriptExec(scriptOnConnectParams.c_str()); @@ -665,6 +666,7 @@ if (!fakeDisconnect) while (it != settings->GetScriptParams().end()) { scriptOnDisonnectParams += " \"" + GetParamValue(it->c_str()) + "\""; + ++it; } ScriptExec(scriptOnDisonnectParams.c_str()); @@ -1495,15 +1497,16 @@ if (name == "userdata6") return property.userdata6; if (name == "userdata7") return property.userdata7; if (name == "userdata8") return property.userdata8; if (name == "userdata9") return property.userdata9; -//if (name == "cash") return property.cash.ToString(); -//if (name == "id") -// { -// std::stringstream stream; -// stream << id; -// return stream.str();; -// } -//if (name == "login") return login; -//if (name == "ip") return currIP.ToString(); +if (name == "cash") return property.cash.ToString(); +if (name == "id") + { + std::stringstream stream; + stream << id; + return stream.str();; + } +if (name == "login") return login; +if (name == "ip") return currIP.ToString(); +return ""; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -- 2.44.2