#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')
{
}
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)