]> git.stg.codes - stg.git/blobdiff - projects/stargazer/admin_impl.cpp
Fix email.
[stg.git] / projects / stargazer / admin_impl.cpp
index d14bfa7d2c559d3c1b48f68ecd74cd66d0e47fcb..9788cec4c76d58af2c4b0fbf2737f53c44847264 100644 (file)
  */
 
 #include "admin_impl.h"
  */
 
 #include "admin_impl.h"
-#include "common.h"
+
+#include "stg/common.h"
 
 //-----------------------------------------------------------------------------
 ADMIN_IMPL::ADMIN_IMPL()
 
 //-----------------------------------------------------------------------------
 ADMIN_IMPL::ADMIN_IMPL()
-    : conf(),
-      ip(0),
-      WriteServLog(GetStgLogger())
+    : ip(0)
 {
 }
 //-----------------------------------------------------------------------------
 ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac)
     : conf(ac),
 {
 }
 //-----------------------------------------------------------------------------
 ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac)
     : conf(ac),
-      ip(0),
-      WriteServLog(GetStgLogger())
+      ip(0)
 {
 }
 //-----------------------------------------------------------------------------
 {
 }
 //-----------------------------------------------------------------------------
@@ -50,45 +48,34 @@ ADMIN_IMPL::ADMIN_IMPL(const PRIV & priv,
                        const std::string & login,
                        const std::string & password)
     : conf(priv, login, password),
                        const std::string & login,
                        const std::string & password)
     : conf(priv, login, password),
-      ip(0),
-      WriteServLog(GetStgLogger())
-{
-}
-//-----------------------------------------------------------------------------
-ADMIN & ADMIN_IMPL::operator=(const ADMIN & adm)
+      ip(0)
 {
 {
-if (&adm == this)
-    return *this;
-
-conf = adm.GetConf();
-ip = adm.GetIP();
-return *this;
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
-ADMIN & ADMIN_IMPL::operator=(const ADMIN_CONF & ac)
+ADMIN_IMPL & ADMIN_IMPL::operator=(const ADMIN_CONF & ac)
 {
 conf = ac;
 return *this;
 }
 //-----------------------------------------------------------------------------
 {
 conf = ac;
 return *this;
 }
 //-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator==(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator==(const ADMIN_IMPL & rhs) const
 {
 {
-return conf.login == rhs.GetLogin();
+return conf.login == rhs.conf.login;
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator!=(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator!=(const ADMIN_IMPL & rhs) const
 {
 {
-return conf.login != rhs.GetLogin();
+return conf.login != rhs.conf.login;
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator<(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator<(const ADMIN_IMPL & rhs) const
 {
 {
-return conf.login < rhs.GetLogin();
+return conf.login < rhs.conf.login;
 }
 //-----------------------------------------------------------------------------
 }
 //-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator<=(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator<=(const ADMIN_IMPL & rhs) const
 {
 {
-return conf.login <= rhs.GetLogin();
+return conf.login <= rhs.conf.login;
 }
 //-----------------------------------------------------------------------------
 std::string ADMIN_IMPL::GetIPStr() const
 }
 //-----------------------------------------------------------------------------
 std::string ADMIN_IMPL::GetIPStr() const