]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_allowinvite.cpp
Fix an shadowing warning in the spanningtree module.
[user/henk/code/inspircd.git] / src / modules / m_allowinvite.cpp
index 05e76113affb7fda59fe3f0311c57d5d85961299..45e54d2ccdadad4ae62de006a78c034c30e0ee46 100644 (file)
 
 #include "inspircd.h"
 
-class AllowInvite : public SimpleChannelModeHandler
-{
- public:
-       AllowInvite(Module* Creator) : SimpleChannelModeHandler(Creator, "allowinvite", 'A') { }
-};
-
 class ModuleAllowInvite : public Module
 {
-       AllowInvite ni;
+       SimpleChannelModeHandler ni;
  public:
 
-       ModuleAllowInvite() : ni(this)
+       ModuleAllowInvite()
+               : ni(this, "allowinvite", 'A')
        {
        }
 
@@ -47,7 +42,7 @@ class ModuleAllowInvite : public Module
                        if (res == MOD_RES_DENY)
                        {
                                // Matching extban, explicitly deny /invite
-                               user->WriteNumeric(ERR_CHANOPRIVSNEEDED, "%s :You are banned from using INVITE", channel->name.c_str());
+                               user->WriteNumeric(ERR_CHANOPRIVSNEEDED, channel->name, "You are banned from using INVITE");
                                return res;
                        }
                        if (channel->IsModeSet(ni) || res == MOD_RES_ALLOW)
@@ -62,7 +57,7 @@ class ModuleAllowInvite : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides support for channel mode +A, allowing /invite freely on a channel and extban A to deny specific users it",VF_VENDOR);
+               return Version("Provides channel mode +A to allow /INVITE freely on a channel, and extban 'A' to deny specific users it", VF_VENDOR);
        }
 };