diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-11 14:08:15 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-11 14:08:15 +0200 |
commit | 84e358da3c97ee61fc1374e5551ad789e1258aa6 (patch) | |
tree | 168a6882e31dbc6d851b417c63a6803305cbf975 /src/modules/m_spanningtree/main.cpp | |
parent | 0205dd6548f331bf3dc70cfce5c9ed82275d9a35 (diff) |
m_spanningtree Initialize membership ids on load
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 14 |
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); |