summaryrefslogtreecommitdiff
path: root/src/chatManager.hpp
blob: 702ef373dcfa58945883e3d1d684ca511538fffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <memory>
#include <string>
#include <vector>

class CChatManager {
  public:
	CChatManager();
	~CChatManager();
	struct SMessage {
		std::string msg;
		std::string username;
	};
	void newMessage(const SMessage &msg);
	void broadcastMessage(const SMessage &msg);

  private:
	void				  broadcastMessage(const std::string &msg, const std::string &username);
	std::vector<SMessage> m_vMessages;
};
inline std::unique_ptr<CChatManager> g_pChatManager;