]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_user_info.cpp
Added missing include.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_user_info.cpp
index 5a101570ec2b888e67b1d5bacd90250a6beadcb9..a4a808d2aeb27458aca7a785474db494a5a22938 100644 (file)
 
 using STG::PARSER::USER_INFO;
 
 
 using STG::PARSER::USER_INFO;
 
+const char * USER_INFO::tag = "GetUserInfo";
+
 int USER_INFO::Start(void * /*data*/, const char *el, const char **attr)
 {
 int USER_INFO::Start(void * /*data*/, const char *el, const char **attr)
 {
-    if (strcasecmp(el, tag.c_str()) != 0)
+    if (strcasecmp(el, m_tag.c_str()) != 0)
         return -1;
 
     if (!attr[1])
         return -1;
 
     if (!attr[1])
@@ -45,16 +47,16 @@ void USER_INFO::CreateAnswer()
     CONST_USER_PTR u;
     if (m_users.FindByName(m_login, &u))
     {
     CONST_USER_PTR u;
     if (m_users.FindByName(m_login, &u))
     {
-        answer = "<UserInfo result=\"error\"/>";
+        m_answer = "<UserInfo result=\"error\"/>";
         return;
     }
 
         return;
     }
 
-    answer = "<UserInfo lastAuthTime=\"" + x2str(u->GetAuthorizedModificationTime()) + "\"" +
+    m_answer = "<UserInfo lastAuthTime=\"" + x2str(u->GetAuthorizedModificationTime()) + "\"" +
              " lastDisconnectTime=\"" + x2str(u->GetConnectedModificationTime()) + "\"" +
              " connected=\"" + (u->GetConnected() ? "true" : "false") + "\"" +
              " lastDisconnectReason=\"" + u->GetLastDisconnectReason() + "\">";
     std::vector<std::string> list(u->GetAuthorizers());
     for (std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); ++it)
              " lastDisconnectTime=\"" + x2str(u->GetConnectedModificationTime()) + "\"" +
              " connected=\"" + (u->GetConnected() ? "true" : "false") + "\"" +
              " lastDisconnectReason=\"" + u->GetLastDisconnectReason() + "\">";
     std::vector<std::string> list(u->GetAuthorizers());
     for (std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); ++it)
-        answer += "<Auth name=\"" + *it + "\"/>";
-    answer += "</UserInfo>";
+        m_answer += "<Auth name=\"" + *it + "\"/>";
+    m_answer += "</UserInfo>";
 }
 }