diff options
| author | 2024-07-19 01:34:52 +0100 | |
|---|---|---|
| committer | 2024-07-19 01:34:52 +0100 | |
| commit | d2fcfeac8bca1b43fa6a34f11c466f6cafeafa2f (patch) | |
| tree | 6b7fab6a89344ddc54006f95d375c789385f9d07 | |
| parent | When recloaking a user don't unset their old host first. (diff) | |
Avoid sending blank messages to users.
| -rw-r--r-- | src/users.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp index e70832f80..4d63dc86e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -707,14 +707,11 @@ void LocalUser::ChangeConnectClass(const std::shared_ptr<ConnectClass>& klass, b void LocalUser::Write(const ClientProtocol::SerializedMessage& text) { - if (!eh.HasFd()) + if (!eh.HasFd() || text.empty()) return; if (ServerInstance->Config->RawLog) { - if (text.empty()) - return; - std::string::size_type nlpos = text.find_first_of("\r\n", 0, 2); if (nlpos == std::string::npos) nlpos = text.length(); |
