From 84e358da3c97ee61fc1374e5551ad789e1258aa6 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 11 Jun 2014 14:08:15 +0200 Subject: m_spanningtree Initialize membership ids on load --- src/modules/m_spanningtree/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/modules') 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); -- cgit v1.2.3