diff options
author | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-25 20:31:33 +0000 |
---|---|---|
committer | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-25 20:31:33 +0000 |
commit | 74ce37ff2bad1f445f85839b3acda05eefd98a1b (patch) | |
tree | 42990f438a124709271089a5f5f3d3eee11f950e /src/modules/m_joinflood.cpp | |
parent | 72943b2c720c1d94b145b4fa61bfb89d65d4ef9c (diff) |
Change m_redirect, m_joinflood and m_messageflood to put their modes in the correct section and to use InsertMode()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2898 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_joinflood.cpp')
-rw-r--r-- | src/modules/m_joinflood.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index a15c48bc9..ca19bf14a 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -221,25 +221,10 @@ class ModuleJoinFlood : public Module List[I_On005Numeric] = List[I_OnExtendedMode] = List[I_OnChannelDelete] = List[I_OnUserPreJoin] = List[I_OnUserJoin] = 1; } - virtual void On005Numeric(std::string &output) - { - std::stringstream line(output); - std::string temp1, temp2; - while (!line.eof()) - { - line >> temp1; - if (temp1.substr(0,10) == "CHANMODES=") - { - // By doing this we're *assuming* no other module has fucked up the CHANMODES= - // section of the 005 numeric. If they have, we're going DOWN in a blaze of glory, - // with a honking great EXCEPTION :) - temp1.insert(temp1.find(",")+1,"j"); - } - temp2 = temp2 + temp1 + " "; - } - if (temp2.length()) - output = temp2.substr(0,temp2.length()-1); - } + virtual void On005Numeric(std::string &output) + { + InsertMode(output, "j", 3); + } virtual ~ModuleJoinFlood() { |