#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
{
tokens["EXTBAN"].push_back('T');
return MOD_RES_PASSTHRU;
else
{
- user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s %s :Can't send NOTICE to channel (+T set)",user->nick.c_str(), c->name.c_str());
+ user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send NOTICE to channel (+T set)");
return MOD_RES_DENY;
}
}