diff options
author | Sadie Powell <sadie@witchery.services> | 2024-02-29 12:31:19 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-02-29 12:31:19 +0000 |
commit | 26919f41d2e2089ca0a4f402cd948d067d030704 (patch) | |
tree | 8f361b64ed7f4722779e8f31f6e7962529bda297 /src | |
parent | 9c80f9e34ef92e9344959ab81d20f2161b1e018c (diff) |
If a PRIVMSG or NOTICE is empty then send a single space instead.
Currently a bunch of code does source.Reply(" ") to ensure that an
empty line gets rendered but this is a much better way to handle
this problem.
The code that does this already will be updated in a future commit
to avoid breaking translations in progress.
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index 007627114..9c614efbf 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -119,12 +119,12 @@ void IRCDProto::SendKick(const MessageSource &source, const Channel *c, User *u, void IRCDProto::SendNoticeInternal(const MessageSource &source, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags) { - Uplink::Send(tags, source, "NOTICE", dest, msg); + Uplink::Send(tags, source, "NOTICE", dest, msg.empty() ? " " : msg); } void IRCDProto::SendPrivmsgInternal(const MessageSource &source, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags) { - Uplink::Send(tags, source, "PRIVMSG", dest, msg); + Uplink::Send(tags, source, "PRIVMSG", dest, msg.empty() ? " " : msg); } void IRCDProto::SendQuit(User *u, const Anope::string &buf) |