#include "inspircd.h"
-/* $ModDesc: Provides channel mode +T to block notices to the channel */
-
class NoNotice : public SimpleChannelModeHandler
{
public:
void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(nt);
- Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
if ((msgtype == MSG_NOTICE) && (target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
Channel* c = (Channel*)dest;
- if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet('T')))
+ if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet(nt)))
{
res = ServerInstance->OnCheckExemption(user,c,"nonotice");
if (res == MOD_RES_ALLOW)