| 1567 | } |
| 1568 | |
| 1569 | void CPluginManager::OnSourceModAllInitialized() |
| 1570 | { |
| 1571 | m_MyIdent = g_ShareSys.CreateCoreIdentity(); |
| 1572 | |
| 1573 | HandleAccess sec; |
| 1574 | handlesys->InitAccessDefaults(NULL, &sec); |
| 1575 | |
| 1576 | sec.access[HandleAccess_Delete] = HANDLE_RESTRICT_IDENTITY; |
| 1577 | sec.access[HandleAccess_Clone] = HANDLE_RESTRICT_IDENTITY; |
| 1578 | |
| 1579 | g_PluginType = handlesys->CreateType("Plugin", this, 0, NULL, &sec, m_MyIdent, NULL); |
| 1580 | g_PluginIdent = g_ShareSys.CreateIdentType("PLUGIN"); |
| 1581 | |
| 1582 | rootmenu->AddRootConsoleCommand3("plugins", "Manage Plugins", this); |
| 1583 | |
| 1584 | g_ShareSys.AddInterface(NULL, GetOldAPI()); |
| 1585 | |
| 1586 | m_pOnLibraryAdded = forwardsys->CreateForward("OnLibraryAdded", ET_Ignore, 1, NULL, Param_String); |
| 1587 | m_pOnLibraryRemoved = forwardsys->CreateForward("OnLibraryRemoved", ET_Ignore, 1, NULL, Param_String); |
| 1588 | m_pOnNotifyPluginUnloaded = forwardsys->CreateForward("OnNotifyPluginUnloaded", ET_Ignore, 1, NULL, Param_Cell); |
| 1589 | } |
| 1590 | |
| 1591 | void CPluginManager::OnSourceModShutdown() |
| 1592 | { |
nothing calls this directly
no test coverage detected