diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-29 19:04:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-29 19:04:57 +0000 |
commit | f9c983eafe94d5a370e755817c513a2db1d718b1 (patch) | |
tree | 6407b598134dfdd72a9569d77941585996bf07c8 /src | |
parent | 7ffd66fba4feaab26dbc8439bf22fc6c3638e284 (diff) |
Line wrapping fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2018 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 6a2c45ec2..42d6696e1 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -776,30 +776,40 @@ class TreeSocket : public InspSocket while (!s.eof()) { s >> param; - if ((param.c_str()[0] == ':') && (item)) + if ((param != "") && (param != "\n")) { - char* str = (char*)param.c_str(); - str++; - param = str; - std::string append; - while (!s.eof()) + if ((param.c_str()[0] == ':') && (item)) { - append = ""; - s >> append; - if (append != "") + char* str = (char*)param.c_str(); + str++; + param = str; + std::string append; + while (!s.eof()) { - param = param + " " + append; + append = ""; + s >> append; + if (append != "") + { + param = param + " " + append; + } } } + item++; + n.push_back(param); + log(DEBUG,"Line: '%s' added param; '%s'",line.c_str(),param.c_str()); } - item++; - n.push_back(param); } return n; } bool ProcessLine(std::string line) { + char* l = (char*)line.c_str(); + while ((strlen(l)) && (l[strlen(l)-1] == '\r') || (l[strlen(l)-1] == '\n')) + l[strlen(l)-1] = '\0'; + line = l; + if (line == "") + return true; Srv->Log(DEBUG,"inbound-line: '"+line+"'"); std::deque<std::string> params = this->Split(line,true); std::string command = ""; @@ -1017,9 +1027,11 @@ bool DoOneToAllButSender(std::string prefix, std::string command, std::deque<std log(DEBUG,"ALLBUTONE: Comes from %s SHOULD NOT go back to %s",prefix.c_str(),omit.c_str()); // TODO: Special stuff with privmsg and notice std::string FullLine = ":" + prefix + " " + command; + log(DEBUG,"*** ALLBUTONE: %d entries!",params.size()); for (unsigned int x = 0; x < params.size(); x++) { FullLine = FullLine + " " + params[x]; + Srv->Log(DEBUG,"Append "+params[x]+" to line, now: "+FullLine); } for (unsigned int x = 0; x < TreeRoot->ChildCount(); x++) { |