diff options
| author | 2014-06-11 14:15:40 +0200 | |
|---|---|---|
| committer | 2014-06-11 14:15:40 +0200 | |
| commit | c8f92d97c2cd92a07bbb76b96a67cd089c7e3407 (patch) | |
| tree | 251053b46d8443040ff69040913aea591b9bea81 /src/modules/m_spanningtree/main.cpp | |
| parent | m_spanningtree Initialize membership ids on load (diff) | |
m_spanningtree Assign an id to new Memberships
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 99f54cce8..6fa494809 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -37,7 +37,9 @@ ModuleSpanningTree::ModuleSpanningTree() : rconnect(this), rsquit(this), map(this) - , commands(NULL), DNS(this, "DNS") + , commands(NULL) + , currmembid(0) + , DNS(this, "DNS") { } @@ -509,6 +511,9 @@ void ModuleSpanningTree::OnUserJoin(Membership* memb, bool sync, bool created_by if (!IS_LOCAL(memb->user)) return; + // Assign the current membership id to the new Membership and increase it + memb->id = currmembid++; + if (created_by_local) { CmdBuilder params("FJOIN"); |
