Remove two sneaky log_debug
This commit is contained in:
@@ -17,7 +17,7 @@ class AdhocCommand
|
||||
{
|
||||
friend class AdhocSession;
|
||||
public:
|
||||
AdhocCommand(std::vector<AdhocStep>&& callback, const std::string& name, const bool admin_only);
|
||||
AdhocCommand(std::vector<AdhocStep>&& callbacks, const std::string& name, const bool admin_only);
|
||||
~AdhocCommand() = default;
|
||||
AdhocCommand(const AdhocCommand&) = default;
|
||||
AdhocCommand(AdhocCommand&&) = default;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <xmpp/adhoc_session.hpp>
|
||||
#include <xmpp/adhoc_command.hpp>
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
AdhocSession::AdhocSession(const AdhocCommand& command, const std::string& owner_jid,
|
||||
const std::string& to_jid):
|
||||
|
||||
@@ -24,7 +24,7 @@ using namespace std::string_literals;
|
||||
|
||||
void DisconnectUserStep1(XmppComponent& xmpp_component, AdhocSession&, XmlNode& command_node)
|
||||
{
|
||||
auto& biboumi_component = static_cast<BiboumiComponent&>(xmpp_component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(xmpp_component);
|
||||
|
||||
XmlSubNode x(command_node, "jabber:x:data:x");
|
||||
x["type"] = "form";
|
||||
@@ -55,7 +55,7 @@ void DisconnectUserStep1(XmppComponent& xmpp_component, AdhocSession&, XmlNode&
|
||||
|
||||
void DisconnectUserStep2(XmppComponent& xmpp_component, AdhocSession& session, XmlNode& command_node)
|
||||
{
|
||||
auto& biboumi_component = static_cast<BiboumiComponent&>(xmpp_component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(xmpp_component);
|
||||
|
||||
// Find out if the jids, and the quit message are provided in the form.
|
||||
std::string quit_message;
|
||||
@@ -151,7 +151,7 @@ void ConfigureGlobalStep1(XmppComponent&, AdhocSession& session, XmlNode& comman
|
||||
|
||||
void ConfigureGlobalStep2(XmppComponent& xmpp_component, AdhocSession& session, XmlNode& command_node)
|
||||
{
|
||||
BiboumiComponent& biboumi_component = static_cast<BiboumiComponent&>(xmpp_component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(xmpp_component);
|
||||
|
||||
const XmlNode* x = command_node.get_child("x", "jabber:x:data");
|
||||
if (x)
|
||||
@@ -533,7 +533,7 @@ void DisconnectUserFromServerStep1(XmppComponent& xmpp_component, AdhocSession&
|
||||
}
|
||||
else
|
||||
{ // Send a form to select the user to disconnect
|
||||
auto& biboumi_component = static_cast<BiboumiComponent&>(xmpp_component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(xmpp_component);
|
||||
|
||||
XmlSubNode x(command_node, "jabber:x:data:x");
|
||||
x["type"] = "form";
|
||||
@@ -578,7 +578,7 @@ void DisconnectUserFromServerStep2(XmppComponent& xmpp_component, AdhocSession&
|
||||
// Send a data form to let the user choose which server to disconnect the
|
||||
// user from
|
||||
command_node.delete_all_children();
|
||||
auto& biboumi_component = static_cast<BiboumiComponent&>(xmpp_component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(xmpp_component);
|
||||
|
||||
XmlSubNode x(command_node, "jabber:x:data:x");
|
||||
x["type"] = "form";
|
||||
@@ -643,7 +643,7 @@ void DisconnectUserFromServerStep3(XmppComponent& xmpp_component, AdhocSession&
|
||||
}
|
||||
}
|
||||
|
||||
auto& biboumi_component = static_cast<BiboumiComponent&>(xmpp_component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(xmpp_component);
|
||||
Bridge* bridge = biboumi_component.find_user_bridge(jid_to_disconnect);
|
||||
auto& clients = bridge->get_irc_clients();
|
||||
|
||||
@@ -671,7 +671,7 @@ void DisconnectUserFromServerStep3(XmppComponent& xmpp_component, AdhocSession&
|
||||
|
||||
void GetIrcConnectionInfoStep1(XmppComponent& component, AdhocSession& session, XmlNode& command_node)
|
||||
{
|
||||
BiboumiComponent& biboumi_component = static_cast<BiboumiComponent&>(component);
|
||||
auto& biboumi_component = dynamic_cast<BiboumiComponent&>(component);
|
||||
|
||||
const Jid owner(session.get_owner_jid());
|
||||
const Jid target(session.get_target_jid());
|
||||
|
||||
@@ -422,7 +422,6 @@ void BiboumiComponent::handle_iq(const Stanza& stanza)
|
||||
}
|
||||
else if (iid.type == Iid::Type::Channel)
|
||||
{
|
||||
log_debug("type_channel");
|
||||
if (node.empty())
|
||||
{
|
||||
this->send_irc_channel_disco_info(id, from, to_str);
|
||||
@@ -763,7 +762,6 @@ void BiboumiComponent::send_irc_channel_muc_traffic_info(const std::string& id,
|
||||
|
||||
void BiboumiComponent::send_irc_channel_disco_info(const std::string& id, const std::string& jid_to, const std::string& jid_from)
|
||||
{
|
||||
log_debug("jid_from: ", jid_from);
|
||||
Jid from(jid_from);
|
||||
Iid iid(from.local, {});
|
||||
Stanza iq("iq");
|
||||
|
||||
+1
-2
@@ -68,8 +68,7 @@ std::string jidprep(const std::string& original)
|
||||
// Using getaddrinfo, check if the domain part is a valid IPv4 (then use
|
||||
// it as is), or IPv6 (surround it with []), or a domain name (run
|
||||
// nameprep)
|
||||
struct addrinfo hints;
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
struct addrinfo hints{};
|
||||
hints.ai_flags = AI_NUMERICHOST;
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ static std::set<std::string> kickable_errors{
|
||||
"malformed-error"
|
||||
};
|
||||
|
||||
XmppComponent::XmppComponent(std::shared_ptr<Poller>& poller, const std::string& hostname, const std::string& secret):
|
||||
XmppComponent::XmppComponent(std::shared_ptr<Poller>& poller, std::string hostname, std::string secret):
|
||||
TCPClientSocketHandler(poller),
|
||||
ever_auth(false),
|
||||
first_connection_try(true),
|
||||
secret(secret),
|
||||
secret(std::move(secret)),
|
||||
authenticated(false),
|
||||
doc_open(false),
|
||||
served_hostname(hostname),
|
||||
served_hostname(std::move(hostname)),
|
||||
stanza_handlers{},
|
||||
adhoc_commands_handler(*this)
|
||||
{
|
||||
@@ -429,7 +429,7 @@ void XmppComponent::send_history_message(const std::string& muc_name, const std:
|
||||
this->send_stanza(message);
|
||||
}
|
||||
|
||||
void XmppComponent::send_muc_leave(const std::string& muc_name, std::string&& nick, Xmpp::body&& message, const std::string& jid_to, const bool self)
|
||||
void XmppComponent::send_muc_leave(const std::string& muc_name, const std::string& nick, Xmpp::body&& message, const std::string& jid_to, const bool self)
|
||||
{
|
||||
Stanza presence("presence");
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
class XmppComponent: public TCPClientSocketHandler
|
||||
{
|
||||
public:
|
||||
explicit XmppComponent(std::shared_ptr<Poller>& poller, const std::string& hostname, const std::string& secret);
|
||||
explicit XmppComponent(std::shared_ptr<Poller>& poller, std::string hostname, std::string secret);
|
||||
virtual ~XmppComponent() = default;
|
||||
|
||||
XmppComponent(const XmppComponent&) = delete;
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
* stanza, and explanation being a short human-readable sentence
|
||||
* describing the error.
|
||||
*/
|
||||
void send_stream_error(const std::string& message, const std::string& explanation);
|
||||
void send_stream_error(const std::string& name, const std::string& explanation);
|
||||
/**
|
||||
* Send error stanza, described in http://xmpp.org/rfcs/rfc6120.html#stanzas-error
|
||||
*/
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
/**
|
||||
* Send an unavailable presence for this nick
|
||||
*/
|
||||
void send_muc_leave(const std::string& muc_name, std::string&& nick, Xmpp::body&& message, const std::string& jid_to, const bool self);
|
||||
void send_muc_leave(const std::string& muc_name, const std::string& nick, Xmpp::body&& message, const std::string& jid_to, const bool self);
|
||||
/**
|
||||
* Indicate that a participant changed his nick
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user