diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-13 13:57:08 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-13 13:57:08 +0000 |
commit | 46311a2d31f182d87bcdfd37dcc0b8fbb1dc5f56 (patch) | |
tree | 66fce08e5f02eda0d2375eedd7b061ec39b9f9a2 | |
parent | 89d956ff8b12ff47fbdeb90db5b8faa72be4d696 (diff) |
Fix setting of +x before we've processed an OnUserConnect
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10536 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_cloaking.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 3cd2f4717..4a9541324 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -100,13 +100,16 @@ class CloakUser : public ModeHandler std::string* cloak; - if (dest->GetExt("cloaked_host", cloak)) + if (!dest->GetExt("cloaked_host", cloak)) { - /* Cloaked host has been set before on this user, don't bother to recalculate and waste cpu */ - dest->ChangeDisplayedHost(cloak->c_str()); - dest->SetMode('x',true); - return MODEACTION_ALLOW; + /* Force creation of missing cloak */ + Sender->OnUserConnect(dest); } + + dest->GetExt("cloaked_host", cloak); + dest->ChangeDisplayedHost(cloak->c_str()); + dest->SetMode('x',true); + return MODEACTION_ALLOW; } } else |