mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Avoid sending blank messages to users.
This commit is contained in:
parent
0cf17f6e33
commit
d2fcfeac8b
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user