-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathchannelurl.cpp
More file actions
31 lines (24 loc) · 752 Bytes
/
channelurl.cpp
File metadata and controls
31 lines (24 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Channel URL blocker.
// So services on freenode will spam this if they set a URL.
// See "/msg ChanServ help set URL"
// :services. 328 KindOne #channel :http://channel.url.goes.here
#include <znc/IRCNetwork.h>
#include <znc/Modules.h>
using std::vector;
class CChannelURL : public CModule {
public:
MODCONSTRUCTOR(CChannelURL) {}
virtual ~CChannelURL() {}
EModRet OnNumericMessage(CNumericMessage& numeric) {
if (numeric.GetCode() == 328) {
return HALT;
}
return CONTINUE;
}
};
template <>
void TModInfo<CChannelURL>(CModInfo& Info) {
// Info.SetWikiPage("ChannelURL");
Info.SetHasArgs(false);
}
NETWORKMODULEDEFS(CChannelURL, "Hide Channel URL (Numeric 328) from IRC clients.")