]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_cban: Implement support for channel masks
authorMichael <michaelhazell@hotmail.com>
Tue, 20 Oct 2020 06:14:33 +0000 (02:14 -0400)
committerSadie Powell <sadie@witchery.services>
Sat, 24 Oct 2020 21:59:51 +0000 (22:59 +0100)
Allows wildcards to be used

docs/conf/helpop.conf.example
src/modules/m_cban.cpp

index 792efcd9c422340c92e1d722ebfb177b42256765..4805ae79087af79e131effd46d428a514f36f2a0 100644 (file)
@@ -572,9 +572,9 @@ the network.
 Sends a message to all users with the +g snomask.
 ">
 
-<helpop key="cban" title="/CBAN <channel> [<duration> [:<reason>]]" value="
-Sets or removes a global channel ban. You must specify all three parameters
-to add a ban, and one parameter to remove a ban (just the channel).
+<helpop key="cban" title="/CBAN <channelmask> [<duration> [:<reason>]]" value="
+Sets or removes a global channel based ban. You must specify all three parameters
+to add a ban, and one parameter to remove a ban (just the channelmask).
 
 The duration may be specified in seconds, or in the format
 1y2w3d4h5m6s - meaning one year, two weeks, three days, four hours,
index 43f53668e9de4d01bb1c34fe36f3761b0521163d..dee8443207f5047e81406f3db58f0bde5e715165 100644 (file)
@@ -58,7 +58,7 @@ public:
 
        bool Matches(const std::string& s) CXX11_OVERRIDE
        {
-               return irc::equals(matchtext, s);
+               return InspIRCd::Match(s, matchtext);
        }
 
        const std::string& Displayable() CXX11_OVERRIDE
@@ -94,7 +94,8 @@ class CommandCBan : public Command
  public:
        CommandCBan(Module* Creator) : Command(Creator, "CBAN", 1, 3)
        {
-               flags_needed = 'o'; this->syntax = "<channel> [<duration> [:<reason>]]";
+               flags_needed = 'o';
+               this->syntax = "<channelmask> [<duration> [:<reason>]]";
        }
 
        CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE