-
Notifications
You must be signed in to change notification settings - Fork 13
/
RenX_ChatLogging.h
33 lines (27 loc) · 1 KB
/
RenX_ChatLogging.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
/**
* This file is in the public domain, furnished "as is", without technical
* support, and with no warranty, express or implied, as to its usefulness for
* any purpose.
*
* Written by Sarah E. <sarah.evans@qq.com>
*/
#if !defined _RENX_CHATLOG_H_HEADER
#define _RENX_CHATLOG_H_HEADER
#include "Jupiter/Plugin.h"
#include "Jupiter/Reference_String.h"
#include "RenX_Plugin.h"
class RenX_ChatLogPlugin : public RenX::Plugin
{
public: // Jupiter::Plugin
bool initialize() override;
~RenX_ChatLogPlugin();
public: // RenX::Plugin
void RenX_OnTeamChat(RenX::Server& server, const RenX::PlayerInfo& player, const Jupiter::ReadableString& message) override;
void RenX_OnChat(RenX::Server& server, const RenX::PlayerInfo& player, const Jupiter::ReadableString& message) override;
public:
void PrepFile();
void WriteToLog(RenX::Server& server, const RenX::PlayerInfo& player, const Jupiter::ReadableString& message, std::string in_prefix);
std::string last_date;
std::fstream fs;
};
#endif // _RENX_CHATLOG_H_HEADER