summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus/src/settings.h
blob: 42a7f2125d636ac52af714784a9ad82534e630ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

struct Settings
{
	Settings();

	CMOption<bool> InfTalkProtection, AddPermanent, HandleAuthReq, AnswNotCaseSens, RemTmpAll, HistLog;
	CMOption<wchar_t*> Question, AuthRepl, Answer, Congratulation, AnswSplitString;
	CMOption<char*> DisabledProtoList;
	CMOption<uint32_t> MaxQuestCount;

	const wchar_t* getQuestion();
	const wchar_t* getReply();
	const wchar_t* getCongrats();

	bool ProtoDisabled(const char *proto)
	{
		std::string temp(proto); temp += ' ';
		return strstr(DisabledProtoList, temp.c_str()) != nullptr;
	}
};

extern Settings g_sets;