summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 46f46e0e0..99f54cce8 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -61,12 +61,26 @@ namespace
for (LocalUserList::const_iterator i = list.begin(); i != list.end(); ++i)
(*i)->server = newserver;
}
+
+ void ResetMembershipIds()
+ {
+ // Set all membership ids to 0
+ const LocalUserList& list = ServerInstance->Users->local_users;
+ for (LocalUserList::iterator i = list.begin(); i != list.end(); ++i)
+ {
+ LocalUser* user = *i;
+ for (UCListIter j = user->chans.begin(); j != user->chans.end(); ++j)
+ (*j)->id = 0;
+ }
+ }
}
void ModuleSpanningTree::init()
{
ServerInstance->SNO->EnableSnomask('l', "LINK");
+ ResetMembershipIds();
+
Utils = new SpanningTreeUtilities(this);
Utils->TreeRoot = new TreeServer;
commands = new SpanningTreeCommands(this);