From 03561f500eb8e82b2ddfa0489fb4ae03c2c9631b Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 28 Dec 2015 16:50:49 +0100 Subject: m_cap Fix incorrect syntax of empty CAP LIST reply Fixes issue #1120 reported by @ProgVal --- src/modules/m_cap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index 3e9c37a34..f74f27f16 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -341,7 +341,7 @@ class CommandCap : public SplitCommand static void DisplayResult(LocalUser* user, std::string& result) { - if (result.size() > 5) + if (*result.rbegin() == ' ') result.erase(result.end()-1); user->WriteCommand("CAP", result); } -- cgit v1.2.3