From d0668060caacf00939fd0b92bf7f3fb84c42fdbe Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 21 Apr 2005 14:21:58 +0000 Subject: Added password field git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1155 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/users.h | 6 ++++++ src/commands.cpp | 1 + 2 files changed, 7 insertions(+) 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 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; -- cgit v1.2.3