2018-07-07 16:20:25 +00:00
|
|
|
#ifndef OPENMW_CHATAPI_HPP
|
|
|
|
#define OPENMW_CHATAPI_HPP
|
|
|
|
|
|
|
|
#include "../Types.hpp"
|
|
|
|
|
2019-01-15 12:26:11 +00:00
|
|
|
#include "../api.h"
|
2019-01-15 11:41:58 +00:00
|
|
|
|
2018-07-07 16:20:25 +00:00
|
|
|
#define CHATAPI \
|
|
|
|
{"SendMessage", ChatFunctions::SendMessage},\
|
|
|
|
{"CleanChatForPid", ChatFunctions::CleanChat},\
|
|
|
|
{"CleanChat", ChatFunctions::CleanChatForPid}
|
|
|
|
|
2019-01-15 12:26:11 +00:00
|
|
|
NAMESPACE_BEGIN(ChatFunctions)
|
2018-07-07 16:20:25 +00:00
|
|
|
/**
|
|
|
|
* \brief Send a message to a certain player.
|
|
|
|
*
|
|
|
|
* \param pid The player ID.
|
|
|
|
* \param message The contents of the message.
|
|
|
|
* \param sendToOtherPlayers Whether this packet should be sent to players other than the
|
|
|
|
* player attached to the packet (false by default).
|
2018-07-07 17:16:36 +00:00
|
|
|
* \param skipAttachedPlayer Whether the packet should skip being sent to the player attached
|
|
|
|
* to the packet (false by default).
|
2018-07-07 16:20:25 +00:00
|
|
|
* \return void
|
|
|
|
*/
|
2019-01-15 12:26:11 +00:00
|
|
|
API_FUNCTION void CDECL SendMessage(unsigned short pid, const char *message, bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept;
|
2018-07-07 16:20:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Remove all messages from chat for a certain player.
|
|
|
|
*
|
|
|
|
* \param pid The player ID.
|
|
|
|
* \return void
|
|
|
|
*/
|
2019-01-15 12:26:11 +00:00
|
|
|
API_FUNCTION void CDECL CleanChatForPid(unsigned short pid);
|
2018-07-07 16:20:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Remove all messages from chat for everyone on the server.
|
|
|
|
*
|
|
|
|
* \return void
|
|
|
|
*/
|
2019-01-15 12:26:11 +00:00
|
|
|
API_FUNCTION void CDECL CleanChat();
|
|
|
|
NAMESPACE_END()
|
2018-07-07 16:20:25 +00:00
|
|
|
|
|
|
|
#endif //OPENMW_CHATAPI_HPP
|