summaryrefslogtreecommitdiff
path: root/src/uplink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uplink.cpp')
-rw-r--r--src/uplink.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/uplink.cpp b/src/uplink.cpp
index baa878db3..7e3322009 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -74,7 +74,33 @@ void Uplink::SendInternal(const Anope::map<Anope::string> &tags, const MessageSo
return;
UplinkSock->Write(message);
- Log(LOG_RAWIO) << "Sent: " << message;
+
+ Log(LOG_RAWIO) << "Sent " << message;
+ if (Anope::ProtocolDebug)
+ {
+ if (tags.empty())
+ Log() << "\tNo tags";
+ else
+ {
+ for (const auto &[tname, tvalue] : tags)
+ Log() << "\tTag " << tname << ": " << tvalue;
+ }
+
+ if (source.GetSource().empty())
+ Log() << "\tNo source";
+ else
+ Log() << "\tSource: " << source.GetSource();
+
+ Log() << "\tCommand: " << command;
+
+ if (params.empty())
+ Log() << "\tNo params";
+ else
+ {
+ for (size_t i = 0; i < params.size(); ++i)
+ Log() << "\tParam " << i << ": " << params[i];
+ }
+ }
}
UplinkSocket::UplinkSocket() : Socket(-1, Config->Uplinks[Anope::CurrentUplink].protocol), ConnectionSocket(), BufferedSocket()