diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-07 21:47:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-07 21:47:31 +0000 |
commit | 830a99acb9512be2f2f056eeed4571c9467847fe (patch) | |
tree | 9f03a174cbdca0125cfb40b527ae9248a996e621 /src | |
parent | 7f15d3a63f9d151bfefcd5c63594a4eba6325a44 (diff) |
Fixed bug where putting too many spaces in a privmsg disconnected the user
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@429 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/InspIRCd.layout | 36 | ||||
-rw-r--r-- | src/inspircd.cpp | 15 | ||||
-rw-r--r-- | src/modules.cpp | 4 |
3 files changed, 32 insertions, 23 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index c55bc3ec4..cc2d3bb3d 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -1,5 +1,5 @@ [Editors] -Focused=-1 +Focused=4 Order=7,3,2,6,25,24,4,5,-1,1,0 [Editor_0] @@ -13,9 +13,9 @@ LeftChar=1 [Editor_1] Open=1 Top=0 -CursorCol=1 -CursorRow=1 -TopLine=1 +CursorCol=45 +CursorRow=4689 +TopLine=4667 LeftChar=1 [Editor_2] @@ -36,10 +36,10 @@ LeftChar=1 [Editor_4] Open=1 -Top=0 -CursorCol=21 -CursorRow=350 -TopLine=326 +Top=1 +CursorCol=67 +CursorRow=321 +TopLine=317 LeftChar=1 [Editor_5] @@ -141,9 +141,9 @@ LeftChar=1 [Editor_17] Open=1 Top=0 -CursorCol=18 -CursorRow=75 -TopLine=59 +CursorCol=1 +CursorRow=115 +TopLine=60 LeftChar=1 [Editor_18] @@ -165,9 +165,9 @@ LeftChar=1 [Editor_20] Open=1 Top=0 -CursorCol=1 -CursorRow=508 -TopLine=463 +CursorCol=6 +CursorRow=553 +TopLine=514 LeftChar=1 [Editor_21] @@ -258,8 +258,8 @@ Open=0 Top=0 [Editor_34] Open=1 -Top=1 -CursorCol=104 -CursorRow=47 -TopLine=35 +Top=0 +CursorCol=9 +CursorRow=58 +TopLine=41 LeftChar=1 diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 8c3080a56..d0fa2d71b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -4682,10 +4682,19 @@ void process_command(userrec *user, char* cmd) } int total_params = 0; - for (int q = 0; q < strlen(cmd); q++) + if (strlen(cmd)>2) { - if (cmd[q] == ' ') - total_params++; + for (int q = 0; q < strlen(cmd)-1; q++) + { + if ((cmd[q] == ' ') && (cmd[q+1] == ':')) + { + total_params++; + // found a 'trailing', we dont count them after this. + break; + } + if (cmd[q] == ' ') + total_params++; + } } // another phidjit bug... diff --git a/src/modules.cpp b/src/modules.cpp index 2f7f1fd16..37a0e742e 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -318,7 +318,7 @@ int Server::CountUsers(chanrec* c) ConfigReader::ConfigReader() { - this->cache = new std::stringstream(stringstream::in | stringstream::out); + this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); this->error = LoadConf(CONFIG_FILE,this->cache); } @@ -332,7 +332,7 @@ ConfigReader::~ConfigReader() ConfigReader::ConfigReader(std::string filename) { - this->cache = new std::stringstream(stringstream::in | stringstream::out); + this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); this->error = LoadConf(filename.c_str(),this->cache); }; |