* ---------------------------------------------------
*/
-#include <stdio.h>
-#include <string>
-#include <vector>
+#define _CRT_SECURE_NO_DEPRECATE
+#define _SCL_SECURE_NO_DEPRECATE
+
+#include "inspircd.h"
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "hashcomp.h"
#include "u_listmode.h"
-#include "inspircd.h"
/* $ModDesc: Provides channel-specific censor lists (like mode +G but varies from channel to channel) */
/* $ModDep: ../../include/u_listmode.h */
public:
ModuleChanFilter(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
cf = new ChanFilter(ServerInstance);
if (!ServerInstance->AddMode(cf, 'g'))
cf->DoChannelDelete(chan);
}
- virtual void OnRehash(const std::string ¶meter)
+ virtual void OnRehash(userrec* user, const std::string ¶meter)
{
cf->DoRehash();
}
virtual int ProcessMessages(userrec* user,chanrec* chan,std::string &text)
{
+ if (!IS_LOCAL(user) || CHANOPS_EXEMPT(ServerInstance, 'g') && chan->GetStatus(user) == STATUS_OP)
+ return 0;
+
// Create a copy of the string in irc::string
irc::string line = text.c_str();
}
}
}
+
return 0;
}
};
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
{
return new ModuleChanFilterFactory;
}