From 51fb5084945d9144f2de1f85076d6f5bb419bc23 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 16 Jul 2006 20:13:40 +0000 Subject: Ignore empty lines, don't try and process them as commands git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4430 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 8 +++++--- src/users.cpp | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index b483c410b..8e704e796 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -326,9 +326,11 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user) while ((a = buffer.find("\r")) != std::string::npos) buffer.erase(a); - log(DEBUG,"CMDIN: %s %s",user->nick,buffer.c_str()); - - this->ProcessCommand(user,buffer); + if (buffer.length()) + { + log(DEBUG,"CMDIN: %s %s",user->nick,buffer.c_str()); + this->ProcessCommand(user,buffer); + } } bool CommandParser::CreateCommand(command_t *f) diff --git a/src/users.cpp b/src/users.cpp index c3d763855..e3104b0d4 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -407,7 +407,8 @@ bool userrec::AddBuffer(const std::string &a) b += *i; } - recvq.append(b); + if (b.length()) + recvq.append(b); if (recvq.length() > (unsigned)this->recvqmax) { -- cgit v1.2.3