Refactored in a way modules have access to bot infrastructure
This commit is contained in:
parent
c605b3ba93
commit
89c04254b8
25 changed files with 245 additions and 216 deletions
|
@ -5,8 +5,9 @@
|
|||
|
||||
#include "gloox/message.h"
|
||||
|
||||
Module::Module::Module(const std::shared_ptr<gloox::Client>& client):
|
||||
client(client)
|
||||
Module::Module::Module(const std::shared_ptr<Core>& core, const std::shared_ptr<Connection>& connection):
|
||||
core(core),
|
||||
connection(connection)
|
||||
{}
|
||||
|
||||
Module::Module::~Module() noexcept {}
|
||||
|
@ -25,11 +26,3 @@ std::vector<std::string> Module::Module::split(const std::string& string, const
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
void Module::Module::sendMessage(const std::shared_ptr<Actor>& actor, const std::string& body) {
|
||||
client->send(gloox::Message(
|
||||
gloox::Message::Chat,
|
||||
actor->jid,
|
||||
body
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue