]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonotice.cpp
and a little tweak to remote MOTD too.
[user/henk/code/inspircd.git] / src / modules / m_nonotice.cpp
index 71e7e570b4cec73d4e09cd1c808a72bb9c27a1d3..58a69da044724059439c2c90c0430f2f5560ff83 100644 (file)
  * ---------------------------------------------------
  */
 
+#include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "inspircd.h"
 
 /* $ModDesc: Provides support for unreal-style channel mode +T */
 
@@ -53,7 +53,7 @@ class ModuleNoNotice : public Module
  public:
  
        ModuleNoNotice(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                
                nt = new NoNotice(ServerInstance);
@@ -68,7 +68,7 @@ class ModuleNoNotice : public Module
        
        virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
-               if (target_type == TYPE_CHANNEL)
+               if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
                        chanrec* c = (chanrec*)dest;
                        if (c->IsModeSet('T'))
@@ -120,7 +120,7 @@ class ModuleNoNoticeFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleNoNoticeFactory;
 }