]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Populate a Modes::ChangeList object in ModeParser::Process()
authorAttila Molnar <attilamolnar@hush.com>
Wed, 3 Sep 2014 12:09:03 +0000 (14:09 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Wed, 3 Sep 2014 12:09:03 +0000 (14:09 +0200)
include/mode.h
src/mode.cpp

index 596a7bcbe98e0d66016b5eb095dd7ca2f5502827..981c29a277f89bf90614127e5bdff7922a4f71d5 100644 (file)
@@ -535,6 +535,10 @@ class CoreExport ModeParser : public fakederef<ModeParser>
         */
        std::multimap<std::string, ModeWatcher*> modewatchermap;
 
+       /** Last processed mode change
+        */
+       Modes::ChangeList LastChangeList;
+
        /** Displays the current modes of a channel or user.
         * Used by ModeParser::Process.
         */
index 4c31a94d773fb5901752f595196a058429abf629..b684af88535d92adb24a665a6beaa65d67d6cdb2 100644 (file)
@@ -375,6 +375,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User* user,
        LastParse.clear();
        LastParseParams.clear();
        LastParseTranslate.clear();
+       LastChangeList.clear();
 
        if ((!targetchannel) && ((!targetuser) || (IS_SERVER(targetuser))))
        {
@@ -474,6 +475,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User* user,
                        LastParseParams.push_back(parameter);
                        LastParseTranslate.push_back(mh->GetTranslateType());
                }
+               LastChangeList.push(mh, adding, parameter);
 
                if ((output_mode.length() + output_parameters.length() > 450)
                                || (output_mode.length() > 100)