-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquote.h
58 lines (46 loc) · 1.16 KB
/
quote.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* quote.h
*
* Created on 14 February 2014
* By: Synergiance
*/
// Local Imports
#include "cmutex.h"
#include "privleges.h"
// Global Imports
#include <string>
#include <vector>
#include <regex>
#include <random>
using namespace std;
#ifndef QUOTES_H_
#define QUOTES_H_
class QuoteHandler
{
public:
// Constructors
QuoteHandler(CMutex& buffer, CPrivleges& priv, string chnl);
~QuoteHandler();
void command(string cmd, string args, string talkto, string usr);
void setVerbosity(bool verbosity);
void getCapabilities(string& capabilities);
private:
CMutex *MessageQueue;
CPrivleges *botPriv;
mt19937* rnd;
vector<int> previous_quotes;
vector<string> quotes;
// int previous_quotes_limit; // Will be used in the future
string quoteFile;
string channel;
bool addedQuotes;
bool verboseMode;
int addQuote(string quote, string sender);
int remQuote(int pos);
bool loadQuotes(string file);
int saveQuotes(string file, bool filtered = false);
void help(string cmd, string usr, string talkto);
void say(string target, string message);
string getQuoter(string& quote);
};
#endif /* QUOTES_H_ */