fix oper tag

This commit is contained in:
Eric Mertens 2025-01-26 19:43:17 -08:00
parent a49389d508
commit cc06429a69
2 changed files with 8 additions and 10 deletions

View File

@ -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));
auto &connection = *thread->self_->get_connection();
connection.sig_ircmsg.connect([thread](auto cmd, auto &msg) {
thread->self_->get_connection()->sig_ircmsg.connect([thread](const auto cmd, auto &msg) {
thread->on_ircmsg(cmd, msg);
});
@ -40,7 +38,7 @@ auto Bot::process_command(std::string_view message, const IrcMsg &msg) -> void
{
account = value;
}
else if (key == "operator")
else if (key == "solanum.chat/oper")
{
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)
{

View File

@ -30,14 +30,14 @@ class Registration : public std::enable_shared_from_this<Registration>
public:
Registration(
Connection &connection_,
Connection &,
const Settings &,
std::shared_ptr<Client> self
std::shared_ptr<Client>
);
static auto start(
Connection &connection,
Connection &,
const Settings &,
std::shared_ptr<Client> self
std::shared_ptr<Client>
) -> std::shared_ptr<Registration>;
};