summaryrefslogtreecommitdiff
path: root/include/modules/cs_entrymsg.h
blob: 219c598a65297589704dd882cc0063b0babf6e8e (plain)
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
/*
 *
 * (C) 2003-2024 Anope Team
 * Contact us at team@anope.org
 *
 * Please read COPYING and README for further details.
 */

#pragma once

struct EntryMsg
{
	Anope::string chan;
	Anope::string creator;
	Anope::string message;
	time_t when;

	virtual ~EntryMsg() = default;
protected:
	EntryMsg() = default;
};

struct EntryMessageList
	: Serialize::Checker<std::vector<EntryMsg *> >
{
protected:
	EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }

public:
	virtual ~EntryMessageList()
	{
		for (unsigned i = (*this)->size(); i > 0; --i)
			delete (*this)->at(i - 1);
	}

	virtual EntryMsg *Create() = 0;
};