* ---------------------------------------------------
*/
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
#include "inspircd.h"
/* $ModDesc: Provides support for ircu style usermode +d (deaf to channel messages and channel notices) */
virtual int PreText(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
{
- if ((target_type == TYPE_CHANNEL) & (IS_LOCAL(user)))
+ if (target_type == TYPE_CHANNEL)
{
chanrec* chan = (chanrec*)dest;
+
if (chan)
{
this->OnBuildExemptList(MSG_PRIVMSG, chan, user, status, exempt_list);
};
-
-class ModuleDeafFactory : public ModuleFactory
-{
- public:
- ModuleDeafFactory()
- {
- }
-
- ~ModuleDeafFactory()
- {
- }
-
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleDeaf(Me);
- }
-
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
- return new ModuleDeafFactory;
-}
-
+MODULE_INIT(ModuleDeaf)