diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-05-14 23:00:58 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-05-14 23:00:58 +0200 |
commit | c5ab97b1efe26609e7b9e3ff2301ad0c0911a0f6 (patch) | |
tree | cd153437710fc7424e3da211454ac4f72d230ba6 /src/modules | |
parent | b89aa87280767f47381b8a612f73f1d0fe682e2e (diff) |
m_spanningtree UID handler: Fix parsing user modes
Spotted by @ShutterQuick
Issue #532
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index f2e394c37..f962ad086 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -100,10 +100,12 @@ CmdResult CommandUID::Handle(const parameterlist ¶ms, User* serversrc) unsigned int paramptr = 9; - // 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 (std::string::const_iterator v = modestr.begin(); v != modestr.end(); ++v) { + // Accept more '+' chars, for now + if (*v == '+') + continue; + /* For each mode thats set, find the mode handler and set it on the new user */ ModeHandler* mh = ServerInstance->Modes->FindMode(*v, MODETYPE_USER); if (!mh) |