summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-12-05 16:42:17 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-12-05 16:42:17 +0100
commitc933f324085d025d4b1b96f4405cdffff52e9256 (patch)
tree6c9dee88d0bef7e19707676fd620d689ab7e5f88 /src/modules
parentb553bf90024895552630fac054213a50ebf9d76c (diff)
m_cap Make Capability objects compatible with dynamic_references, add Cap::Reference
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cap.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index c01377f46..3e9c37a34 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -170,6 +170,7 @@ class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener
cap->bit = AllocateBit();
cap->extitem = &capext;
caps.insert(std::make_pair(cap->GetName(), cap));
+ ServerInstance->Modules.AddReferent("cap/" + cap->GetName(), cap);
FOREACH_MOD_CUSTOM(evprov, Cap::EventListener, OnCapAddDel, (cap, true));
}
@@ -193,6 +194,7 @@ class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener
cap->set(user, false);
}
+ ServerInstance->Modules.DelReferent(cap);
cap->Unregister();
caps.erase(cap->GetName());
}