]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Make ident handling consistant: use ChangeIdent for all ident manipulation. This...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 14 Aug 2009 20:43:46 +0000 (20:43 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 14 Aug 2009 20:43:46 +0000 (20:43 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11518 e03df62e-2008-0410-955e-edbf42e46eb7

src/commands/cmd_user.cpp
src/modules/m_ident.cpp

index e2777e8c8a7a8b7d15d202906bb0a3c0128f0eb9..833a9b2754603ce2605419619df444fa8b3a4799 100644 (file)
@@ -40,7 +40,7 @@ CmdResult CommandUser::Handle (const std::vector<std::string>& parameters, User
                         * ~ character, and +1 for null termination, therefore we can safely use up to
                         * IDENTMAX here.
                         */
-                       user->ident.assign(parameters[0], 0, ServerInstance->Config->Limits.IdentMax);
+                       user->ChangeIdent(parameters[0].c_str());
                        user->fullname.assign(parameters[3].empty() ? std::string("No info") : parameters[3], 0, ServerInstance->Config->Limits.MaxGecos);
                        user->registered = (user->registered | REG_USER);
                }
index 71767e554866d88e4cd99f4893bb24a44f2bfa9e..d5ca208365312495cff8af9e6e4864729034cafa 100644 (file)
@@ -452,9 +452,7 @@ class ModuleIdent : public Module
                        user->WriteServ("NOTICE Auth :*** Could not find your ident, using %s instead.", isock->GetResult());
 
                /* Copy the ident string to the user */
-               std::string ident;
-               ident.assign(isock->GetResult(), 0, ServerInstance->Config->Limits.IdentMax + 1);
-               user->ChangeIdent(ident.c_str());
+               user->ChangeIdent(isock->GetResult());
 
                /* The user isnt actually disconnecting, we call this to clean up the user */
                OnUserDisconnect(user);