summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-17 02:43:07 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-17 02:43:07 +0000
commitc80a20b5a789f4c2079fe10da89a4095e179a35b (patch)
tree256c2a15704d561a59faaec3c871c2b79d3953b2 /src/users.cpp
parent8014b79b0c4f5d58d231e68189e298ea2859f653 (diff)
Clean up excessive bits in User struct
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11882 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 324edbfdb..657225069 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -228,17 +228,16 @@ User::User(const std::string &uid)
Penalty = 0;
lastping = signon = idle_lastmsg = nping = registered = 0;
bytes_in = bytes_out = cmds_in = cmds_out = 0;
- quietquit = quitting = exempt = haspassed = dns_done = false;
+ quietquit = quitting = exempt = dns_done = false;
fd = -1;
server_sa.sa.sa_family = AF_UNSPEC;
client_sa.sa.sa_family = AF_UNSPEC;
- MyClass = NULL;
AllowedPrivs = AllowedOperCommands = NULL;
if (uid.empty())
- uuid.assign(ServerInstance->GetUID(), 0, UUID_LENGTH - 1);
+ uuid = ServerInstance->GetUID();
else
- uuid.assign(uid, 0, UUID_LENGTH - 1);
+ uuid = uid;
ServerInstance->Logs->Log("USERS", DEBUG,"New UUID for user: %s (%s)", uuid.c_str(), uid.empty() ? "allocated new" : "used remote");
@@ -846,10 +845,13 @@ void User::FullConnect()
/* Check the password, if one is required by the user's connect class.
* This CANNOT be in CheckClass(), because that is called prior to PASS as well!
*/
- if (this->MyClass && !this->MyClass->GetPass().empty() && !this->haspassed)
+ if (MyClass && !MyClass->pass.empty())
{
- ServerInstance->Users->QuitUser(this, "Invalid password");
- return;
+ if (ServerInstance->PassCompare(this, MyClass->pass.c_str(), password.c_str(), MyClass->hash.c_str()))
+ {
+ ServerInstance->Users->QuitUser(this, "Invalid password");
+ return;
+ }
}
if (this->CheckLines())