summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-21 14:21:58 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-21 14:21:58 +0000
commitd0668060caacf00939fd0b92bf7f3fb84c42fdbe (patch)
treeacd66af6b6c2488790d94a35560f34bbfe7d78ae
parent1498e89b98306a76fd0803db82acd29be1e2a636 (diff)
Added password field
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1155 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/users.h6
-rw-r--r--src/commands.cpp1
2 files changed, 7 insertions, 0 deletions
diff --git a/include/users.h b/include/users.h
index f915a6e5f..098762eca 100644
--- a/include/users.h
+++ b/include/users.h
@@ -167,6 +167,12 @@ class userrec : public connection
*/
unsigned long pingmax;
+ /** Password specified by the user when they registered.
+ * This is stored even if the <connect> block doesnt need a password, so that
+ * modules may check it.
+ */
+ char password[MAXBUF];
+
userrec();
virtual ~userrec() { }
diff --git a/src/commands.cpp b/src/commands.cpp
index e69ad41f6..7093386aa 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -430,6 +430,7 @@ void handle_pass(char **parameters, int pcnt, userrec *user)
WriteServ(user->fd,"462 %s :You may not reregister",user->nick);
return;
}
+ strlcpy(user->password,parameters[0],MAXBUF);
if (!strcasecmp(parameters[0],Passwd(user)))
{
user->haspassed = true;