Skip to content

Commit

Permalink
(Hopefully) fix a issue with m_ident's result not being used for disp…
Browse files Browse the repository at this point in the history
…lay.

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
  • Loading branch information
psychon committed Aug 14, 2009
1 parent a9f3a0a commit 32810ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/m_ident.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 32810ff

Please sign in to comment.