From e0f00618c3c7440de7ed091a93e016175dc8c3b5 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 3 Apr 2004 17:24:37 +0000 Subject: Fixed command parser to tidy up malformed commands (xchat inserts extra spaces) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@364 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a515ab212..62cdffd09 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -206,6 +206,44 @@ void safedelete(chanrec *p) } +void tidystring(char* str) +{ + // strips out double spaces before a : parameter + char temp[MAXBUF]; + bool go_again = true; + + while (go_again) + { + bool noparse = false; + int t = 0, a = 0; + go_again = false; + while (a < strlen(str)) + { + if ((anick,cmd); + tidystring(cmd); process_command(user,cmd); } -- cgit v1.2.3