From cd8318370ab2a30e08af02a21b3dc343c65fec01 Mon Sep 17 00:00:00 2001 From: psychon Date: Wed, 23 Jul 2008 13:36:04 +0000 Subject: [PATCH] Some weird clients might send a nickmask prefix, handle this correctly *cough* eggdrop is evil *cough* Thanks to dare for debugging this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1144 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Client.cpp b/Client.cpp index 93e46d86..7c5385df 100644 --- a/Client.cpp +++ b/Client.cpp @@ -46,6 +46,12 @@ void CClient::ReadLine(const CString& sData) { #endif CString sCommand = sLine.Token(0); + if (sCommand.Left(1) == ":") { + // Evil client! Sending a nickmask prefix on client's command + // is bad, bad, bad, bad, bad, bad, bad, bad, BAD, B A D! + sLine = sLine.Token(1, true); + sCommand = sLine.Token(0); + } if (sCommand.CaseCmp("PASS") == 0) { if (!IsAttached()) {