summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-03 12:56:31 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-03 12:56:31 +0000
commitc8afadf9393178a3291121d669532b5970abac1c (patch)
tree8635a8e3787fc9e78399248bf82a18d4c5866192
parentb46b5f95258f239d427700dc032f78d920193fb4 (diff)
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
-rw-r--r--src/modules/m_spanningtree.cpp28
1 files 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<std::string> 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<std::string> 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];