Commit 700a6c7b authored by louiz’'s avatar louiz’

JID class provides bare() and full() methods

parent 756b2970
......@@ -15,6 +15,15 @@ public:
std::string local;
std::string resource;
std::string bare() const
{
return this->local + "@" + this->domain;
}
std::string full() const
{
return this->local + "@" + this->domain + "/" + this->resource;
}
private:
Jid(const Jid&) = delete;
Jid(Jid&&) = delete;
......
......@@ -394,7 +394,7 @@ void BiboumiComponent::handle_iq(const Stanza& stanza)
{ // Get biboumi's adhoc commands
this->send_adhoc_commands_list(id, from, this->served_hostname,
(Config::get("admin", "") ==
from_jid.local + "@" + from_jid.domain),
from_jid.bare()),
this->adhoc_commands_handler);
stanza_error.disable();
}
......@@ -402,7 +402,7 @@ void BiboumiComponent::handle_iq(const Stanza& stanza)
{ // Get the server's adhoc commands
this->send_adhoc_commands_list(id, from, to_str,
(Config::get("admin", "") ==
from_jid.local + "@" + from_jid.domain),
from_jid.bare()),
this->irc_server_adhoc_commands_handler);
stanza_error.disable();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment