From fea69b05696db26abef5a113b0868034e4370338 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 23 Mar 2010 14:51:43 +0000 Subject: Fix CommandFloodPenalty overflow on connect git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12659 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/modules/m_cloaking.cpp') diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 8021fcbd4..5b485704b 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -56,11 +56,11 @@ class CloakUser : public ModeHandler return MODEACTION_ALLOW; } - /* don't allow this user to spam modechanges */ - IS_LOCAL(dest)->CommandFloodPenalty += 5000; - if (adding && !dest->IsModeSet('x')) { + /* don't allow this user to spam modechanges */ + IS_LOCAL(dest)->CommandFloodPenalty += 5000; + std::string* cloak = ext.get(dest); if (!cloak) @@ -78,6 +78,9 @@ class CloakUser : public ModeHandler } else if (!adding && dest->IsModeSet('x')) { + /* don't allow this user to spam modechanges */ + IS_LOCAL(dest)->CommandFloodPenalty += 5000; + /* User is removing the mode, so restore their real host * and make it match the displayed one. */ -- cgit v1.3.1-10-gc9f91