From c8afadf9393178a3291121d669532b5970abac1c Mon Sep 17 00:00:00 2001 From: om Date: Mon, 3 Jul 2006 12:56:31 +0000 Subject: Cleanups, change ugly if(\!*line.c_str()) to if(line.empty()); remove some craq.. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4107 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index f9a4faffb..841206b8f 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2213,36 +2213,28 @@ class TreeSocket : public InspSocket bool ProcessLine(std::string line) { - if (!*line.c_str()) + std::deque params; + irc::string command; + std::string prefix; + + if (line.empty()) return true; line = line.substr(0, line.find_first_of("\r\n")); log(DEBUG,"IN: %s", line.c_str()); - - std::deque params; this->Split(line.c_str(),true,params); - - irc::string command = ""; - std::string prefix = ""; - + if ((params[0][0] == ':') && (params.size() > 1)) { - prefix = params[0]; - command = params[1].c_str(); - char* pref = (char*)prefix.c_str(); - prefix = ++pref; - params.pop_front(); - params.pop_front(); - } - else - { - prefix = ""; - command = params[0].c_str(); + prefix = params[0].substr(1); params.pop_front(); } + command = params[0].c_str(); + params.pop_front(); + if ((!this->ctx_in) && (command == "AES")) { std::string sserv = params[0]; -- cgit v1.2.3