X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noctcp.cpp;h=c9ed1297cbe126cdee4121a0e6bc3469a00e622b;hb=cd7657bddc7a6dc2e7326077d173a874bf71f6bd;hp=622a08ac68463bc69de13ed8a6c1eaf6dcd5b21e;hpb=67878d628c15f2adec41b6d3b266830a636c2ed0;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 622a08ac6..c9ed1297c 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -11,15 +11,13 @@ * --------------------------------------------------- */ +#include "inspircd.h" #include "users.h" #include "channels.h" #include "modules.h" -#include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +c */ - - class NoCTCP : public ModeHandler { public: @@ -56,7 +54,7 @@ class ModuleNoCTCP : public Module public: ModuleNoCTCP(InspIRCd* Me) - : Module::Module(Me) + : Module(Me) { nc = new NoCTCP(ServerInstance); @@ -76,7 +74,7 @@ class ModuleNoCTCP : 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('C')) @@ -126,7 +124,7 @@ class ModuleNoCTCPFactory : public ModuleFactory }; -extern "C" void * init_module( void ) +extern "C" DllExport void * init_module( void ) { return new ModuleNoCTCPFactory; }