summaryrefslogtreecommitdiff
path: root/src/process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.cpp')
-rw-r--r--src/process.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/process.cpp b/src/process.cpp
index a81340250..4ba0e23f0 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -126,17 +126,21 @@ bool IRCDProto::Parse(const Anope::string &buffer, Anope::map<Anope::string> &ta
bool IRCDProto::Format(Anope::string &message, const Anope::map<Anope::string> &tags, const MessageSource &source, const Anope::string &command, const std::vector<Anope::string> &params)
{
std::stringstream buffer;
- if (CanSendTags && !tags.empty())
+ if (!tags.empty())
{
char separator = '@';
for (const auto &[tname, tvalue] : tags)
{
- buffer << separator << tname;
- if (!tvalue.empty())
- buffer << '=' << tvalue;
- separator = ';';
+ if (IRCD->IsTagValid(tname, tvalue))
+ {
+ buffer << separator << tname;
+ if (!tvalue.empty())
+ buffer << '=' << tvalue;
+ separator = ';';
+ }
}
- buffer << ' ';
+ if (separator != '@')
+ buffer << ' ';
}
if (source.GetServer())