]> git.stg.codes - stg.git/commitdiff
Correcting return in method GetParamValue and cycle in methods OnConnect and OnDisconnect
authorNaffanya <naffanya@naffanya.(none)>
Sun, 18 Aug 2013 20:22:13 +0000 (23:22 +0300)
committerNaffanya <naffanya@naffanya.(none)>
Sun, 18 Aug 2013 20:22:13 +0000 (23:22 +0300)
projects/stargazer/user_impl.cpp

index d56cd227a2fce6909a10af1a993430fe8050f7a8..52731b7bd8581f4a593d87f5daadb60f1180fea2 100644 (file)
@@ -602,6 +602,7 @@ if (!fakeConnect)
         while (it != settings->GetScriptParams().end())
             {
             scriptOnConnectParams += " \"" + GetParamValue(it->c_str()) + "\"";
         while (it != settings->GetScriptParams().end())
             {
             scriptOnConnectParams += " \"" + GetParamValue(it->c_str()) + "\"";
+            ++it;
             }
 
         ScriptExec(scriptOnConnectParams.c_str());
             }
 
         ScriptExec(scriptOnConnectParams.c_str());
@@ -665,6 +666,7 @@ if (!fakeDisconnect)
         while (it != settings->GetScriptParams().end())
             {
             scriptOnDisonnectParams += " \"" + GetParamValue(it->c_str()) + "\"";
         while (it != settings->GetScriptParams().end())
             {
             scriptOnDisonnectParams += " \"" + GetParamValue(it->c_str()) + "\"";
+            ++it;
             }
 
         ScriptExec(scriptOnDisonnectParams.c_str());
             }
 
         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 == "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 "";
 }
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------