]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_exemptchanops.cpp
Convert InspIRCd::SetSignals to a static function.
[user/henk/code/inspircd.git] / src / modules / m_exemptchanops.cpp
index 7a40063fc824014e6cfc225bebec88f50df267a5..794b06f6abc77e4d91502ee53729b22f99f98901 100644 (file)
@@ -29,6 +29,7 @@ class ExemptChanOps : public ListModeBase
        ExemptChanOps(Module* Creator)
                : ListModeBase(Creator, "exemptchanops", 'X', "End of channel exemptchanops list", 954, 953, false)
        {
+               syntax = "<restriction>:<prefix>";
        }
 
        static PrefixMode* FindMode(const std::string& mode)
@@ -48,7 +49,7 @@ class ExemptChanOps : public ListModeBase
                        return false;
 
                restriction.assign(entry, 0, colon);
-               prefix.assign(entry, colon + 1);
+               prefix.assign(entry, colon + 1, std::string::npos);
                return true;
        }
 
@@ -77,7 +78,7 @@ class ExemptChanOps : public ListModeBase
                std::string prefix;
                if (!ParseEntry(word, restriction, prefix))
                {
-                       user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word, "Invalid exemptchanops entry, format is <restriction>:<prefix>"));
+                       user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word));
                        return false;
                }
 
@@ -89,13 +90,13 @@ class ExemptChanOps : public ListModeBase
 
                if (!ServerInstance->Modes->FindMode(restriction, MODETYPE_CHANNEL))
                {
-                       user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word, "Unknown restriction"));
+                       user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word, "Unknown restriction."));
                        return false;
                }
 
                if (prefix != "*" && !FindMode(prefix))
                {
-                       user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word, "Unknown prefix mode"));
+                       user->WriteNumeric(Numerics::InvalidModeParameter(chan, this, word, "Unknown prefix mode."));
                        return false;
                }