summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_user.cpp2
-rw-r--r--src/modules/m_ident.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/commands/cmd_user.cpp b/src/commands/cmd_user.cpp
index e2777e8c8..833a9b275 100644
--- a/src/commands/cmd_user.cpp
+++ b/src/commands/cmd_user.cpp
@@ -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);
}
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 71767e554..d5ca20836 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -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);