summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-31 15:54:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-31 15:54:43 +0000
commitdc2703b066bca07dcbe032c07b70e6c0270d5a0a (patch)
treeea5b48f8cab23a7373c5926a1bc0e6df1285fc66 /src/modules
parent7e5439b27f0f64d876034de22c18fe306d9e742d (diff)
Two fixes: Ignore + when parsing mode string in UID, and dont prepend + if we already have one, to prevent '++'
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10368 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/uid.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index b0f5df21d..14c4e2bb5 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -114,6 +114,9 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
unsigned int paramptr = 9;
for (std::string::iterator v = params[8].begin(); v != params[8].end(); v++)
{
+ if (*v == '+')
+ continue;
+
/* For each mode thats set, increase counter */
ModeHandler* mh = Instance->Modes->FindMode(*v, MODETYPE_USER);
@@ -138,7 +141,8 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
//_new->ProcessNoticeMasks(params[7].c_str());
/* now we've done with modes processing, put the + back for remote servers */
- params[8] = "+" + params[8];
+ if (params[8][0] != '+')
+ params[8] = "+" + params[8];
#ifdef SUPPORT_IP6LINKS
if (params[6].find_first_of(":") != std::string::npos)