summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-04 20:10:58 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-12 21:03:03 +0200
commitaaabf27f44960be687688cf814a08a0ab032fadc (patch)
tree889e7806e44fcf571eac29f8d80bd98b00103664 /src
parent4a0748dffd87d424f2829299cec80cee167a421a (diff)
m_spanningtree UID handler: Remove dead code
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/uid.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index d6bded5e5..8a74e2f93 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -38,7 +38,7 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
time_t age_t = ConvToInt(params[1]);
time_t signon = ConvToInt(params[7]);
std::string empty;
- std::string modestr(params[8]);
+ const std::string& modestr = params[8];
TreeServer* remoteserver = Utils->FindServer(serversrc->server);
@@ -101,13 +101,11 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
_new->signon = signon;
_new->age = age_t;
- /* we need to remove the + from the modestring, so we can do our stuff */
- std::string::size_type pos_after_plus = modestr.find_first_not_of('+');
- if (pos_after_plus != std::string::npos)
- modestr = modestr.substr(pos_after_plus);
-
unsigned int paramptr = 9;
- for (std::string::iterator v = modestr.begin(); v != modestr.end(); v++)
+
+ // Accept more '+' chars, for now
+ std::string::size_type pos = modestr.find_first_not_of('+');
+ for (std::string::const_iterator v = modestr.begin()+pos; v != modestr.end(); ++v)
{
/* For each mode thats set, increase counter */
ModeHandler* mh = ServerInstance->Modes->FindMode(*v, MODETYPE_USER);
@@ -136,10 +134,6 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
}
}
- /* now we've done with modes processing, put the + back for remote servers */
- if (modestr[0] != '+')
- modestr = "+" + modestr;
-
_new->SetClientIP(params[6].c_str());
ServerInstance->Users->AddGlobalClone(_new);