fix oper tag
This commit is contained in:
parent
a49389d508
commit
cc06429a69
8
bot.cpp
8
bot.cpp
@ -6,9 +6,7 @@ auto Bot::start(std::shared_ptr<Client> self) -> std::shared_ptr<Bot>
|
|||||||
{
|
{
|
||||||
const auto thread = std::make_shared<Bot>(std::move(self));
|
const auto thread = std::make_shared<Bot>(std::move(self));
|
||||||
|
|
||||||
auto &connection = *thread->self_->get_connection();
|
thread->self_->get_connection()->sig_ircmsg.connect([thread](const auto cmd, auto &msg) {
|
||||||
|
|
||||||
connection.sig_ircmsg.connect([thread](auto cmd, auto &msg) {
|
|
||||||
thread->on_ircmsg(cmd, msg);
|
thread->on_ircmsg(cmd, msg);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -40,7 +38,7 @@ auto Bot::process_command(std::string_view message, const IrcMsg &msg) -> void
|
|||||||
{
|
{
|
||||||
account = value;
|
account = value;
|
||||||
}
|
}
|
||||||
else if (key == "operator")
|
else if (key == "solanum.chat/oper")
|
||||||
{
|
{
|
||||||
oper = value;
|
oper = value;
|
||||||
}
|
}
|
||||||
@ -56,7 +54,7 @@ auto Bot::process_command(std::string_view message, const IrcMsg &msg) -> void
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Bot::on_ircmsg(IrcCommand cmd, const IrcMsg &msg) -> void
|
auto Bot::on_ircmsg(const IrcCommand cmd, const IrcMsg &msg) -> void
|
||||||
{
|
{
|
||||||
if (cmd == IrcCommand::PRIVMSG)
|
if (cmd == IrcCommand::PRIVMSG)
|
||||||
{
|
{
|
||||||
|
@ -30,14 +30,14 @@ class Registration : public std::enable_shared_from_this<Registration>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Registration(
|
Registration(
|
||||||
Connection &connection_,
|
Connection &,
|
||||||
const Settings &,
|
const Settings &,
|
||||||
std::shared_ptr<Client> self
|
std::shared_ptr<Client>
|
||||||
);
|
);
|
||||||
|
|
||||||
static auto start(
|
static auto start(
|
||||||
Connection &connection,
|
Connection &,
|
||||||
const Settings &,
|
const Settings &,
|
||||||
std::shared_ptr<Client> self
|
std::shared_ptr<Client>
|
||||||
) -> std::shared_ptr<Registration>;
|
) -> std::shared_ptr<Registration>;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user