Last active
December 22, 2015 00:48
-
-
Save mattstevens/6391429 to your computer and use it in GitHub Desktop.
Quick and dirty ZNC filter to stop people from crashing clients (no longer needed as of 10.8.5)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <znc/Modules.h> | |
using namespace std; | |
static const char evil[] = { (char)0xd8, (char)0xb3, 0 }; | |
class CFilterMod : public CModule { | |
public: | |
MODCONSTRUCTOR(CFilterMod) { | |
} | |
virtual EModRet OnChanMsg(CNick& Nick, CChan& Channel, CString& sMessage) { | |
if (sMessage.find(evil) != string::npos) { | |
return HALT; | |
} | |
return CONTINUE; | |
} | |
}; | |
MODULEDEFS(CFilterMod, "Message filter module") |
Author
mattstevens
commented
Aug 30, 2013
- znc-buildmod filter.cpp
- Copy filter.so into ZNC modules directory
- /msg *status loadmod filter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment