~singpolyma/biboumi

700a6c7bc39aa48af5037ecbb9778b20fb6f87df — Florent Le Coz 8 years ago 756b297
JID class provides bare() and full() methods
2 files changed, 11 insertions(+), 2 deletions(-)

M louloulibs/xmpp/jid.hpp
M src/xmpp/biboumi_component.cpp
M louloulibs/xmpp/jid.hpp => louloulibs/xmpp/jid.hpp +9 -0
@@ 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;

M src/xmpp/biboumi_component.cpp => src/xmpp/biboumi_component.cpp +2 -2
@@ 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();
                }