From 32810ff62b41cff00b9d664f62e570046c3a57a9 Mon Sep 17 00:00:00 2001 From: psychon Date: Fri, 14 Aug 2009 19:50:53 +0000 Subject: (Hopefully) fix a issue with m_ident's result not being used for display. The user class has a couple of caches for the user's hostmask. If one of those caches is initialized before m_ident set the user's new ident it would stick around until the cache was invalidated the next time. This patch fixes this by using the proper API for setting a user's ident which also invalidates any caches which might still have the old ident. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11514 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_ident.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 24e27d560..71767e554 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -452,7 +452,9 @@ 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 */ - user->ident.assign(isock->GetResult(), 0, ServerInstance->Config->Limits.IdentMax + 1); + std::string ident; + ident.assign(isock->GetResult(), 0, ServerInstance->Config->Limits.IdentMax + 1); + user->ChangeIdent(ident.c_str()); /* The user isnt actually disconnecting, we call this to clean up the user */ OnUserDisconnect(user); -- cgit v1.2.3