]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banexception.cpp
Some more text fixes and improvements (#1618).
[user/henk/code/inspircd.git] / src / modules / m_banexception.cpp
index b29b397475e5e304fb2e79b76e85e3713258a666..c7864ea9e88b56311eef5aa8b172eec865a2bdbe 100644 (file)
 class BanException : public ListModeBase
 {
  public:
-       BanException(Module* Creator) : ListModeBase(Creator, "banexception", 'e', "End of Channel Exception List", 348, 349, true) { }
+       BanException(Module* Creator)
+               : ListModeBase(Creator, "banexception", 'e', "End of Channel Exception List", 348, 349, true)
+       {
+       }
 };
 
 
@@ -53,7 +56,7 @@ class ModuleBanException : public Module
 
        void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
        {
-               tokens["EXCEPTS"] = "e";
+               tokens["EXCEPTS"] = ConvToStr(be.GetModeChar());
        }
 
        ModResult OnExtBanCheck(User *user, Channel *chan, char type) CXX11_OVERRIDE
@@ -64,7 +67,7 @@ class ModuleBanException : public Module
 
                for (ListModeBase::ModeList::iterator it = list->begin(); it != list->end(); it++)
                {
-                       if (it->mask[0] != type || it->mask[1] != ':')
+                       if (it->mask.length() <= 2 || it->mask[0] != type || it->mask[1] != ':')
                                continue;
 
                        if (chan->CheckBan(user, it->mask.substr(2)))
@@ -104,7 +107,7 @@ class ModuleBanException : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides support for the +e channel mode", VF_VENDOR);
+               return Version("Provides channel mode +e, ban exceptions", VF_VENDOR);
        }
 };