summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-28 17:29:41 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-28 17:29:41 +0000
commit04b820b329f4be18cafe86cd4204d2c84d5acf65 (patch)
tree83848656cb81e30baeb897fc8099bf1a88754bff /src/users.cpp
parente4c1ae81efcfce5d5105c49bbb17356496e67ff1 (diff)
Fixed a bug that caused classes with passwords to instantly disconnect any users (thanks Darom). Needs QA
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7414 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 7e0851f59..5bfc9a46b 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1015,11 +1015,6 @@ void userrec::CheckClass()
userrec::QuitUser(ServerInstance, this, "Unauthorised connection");
return;
}
- else if ((!a->GetPass().empty()) && (!this->haspassed))
- {
- userrec::QuitUser(ServerInstance, this, "Invalid password");
- return;
- }
else if ((a->GetMaxLocal()) && (this->LocalCloneCount() > a->GetMaxLocal()))
{
userrec::QuitUser(ServerInstance, this, "No more connections allowed from your host via this connect class (local)");
@@ -1046,7 +1041,16 @@ void userrec::FullConnect()
* Don't remove this! -- w00t
*/
this->CheckClass();
-
+
+ /* 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->GetClass()->GetPass().empty()) && (!this->haspassed))
+ {
+ userrec::QuitUser(ServerInstance, this, "Invalid password");
+ return;
+ }
+
if (!this->exempt)
{
GLine* r = ServerInstance->XLines->matches_gline(this);