summaryrefslogtreecommitdiff
path: root/src/cmd_pass.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-22 20:12:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-22 20:12:15 +0000
commit49eabd1197dcd604950e6d6b6d838ba2e63188ab (patch)
tree3d6ec0bc8a51412ef7e68ebb1be6d5f11516d453 /src/cmd_pass.cpp
parent9bfb3f0068d29d75a488133a6e71c10e3339b956 (diff)
Refactor connect allow/deny lines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6061 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_pass.cpp')
-rw-r--r--src/cmd_pass.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd_pass.cpp b/src/cmd_pass.cpp
index 60930c5b5..05f9114e0 100644
--- a/src/cmd_pass.cpp
+++ b/src/cmd_pass.cpp
@@ -29,9 +29,12 @@ CmdResult cmd_pass::Handle (const char** parameters, int pcnt, userrec *user)
user->WriteServ("462 %s :You may not reregister",user->nick);
return CMD_FAILURE;
}
- ConnectClass a = user->GetClass();
+ ConnectClass* a = user->GetClass();
+ if (!a)
+ return CMD_FAILURE;
+
strlcpy(user->password,parameters[0],63);
- if (!strcmp(parameters[0],a.pass.c_str()))
+ if (a->GetPass() == parameters[0])
{
user->haspassed = true;
}