From c5ab97b1efe26609e7b9e3ff2301ad0c0911a0f6 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 14 May 2013 23:00:58 +0200 Subject: m_spanningtree UID handler: Fix parsing user modes Spotted by @ShutterQuick Issue #532 --- src/modules/m_spanningtree/uid.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/modules') 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) -- cgit v1.2.3