1.1 --- a/sourcemm/metamod_plugins.cpp Fri Sep 28 21:41:41 2007 +0000
1.2 +++ b/sourcemm/metamod_plugins.cpp Sat Sep 29 04:07:06 2007 +0000
1.3 @@ -489,6 +489,8 @@
1.4 //Make sure to detach it from sourcehook!
1.5 g_SourceHook.UnloadPlugin(pl->m_Id);
1.6
1.7 + pl->m_Events.clear();
1.8 +
1.9 UnregAllConCmds(pl);
1.10
1.11 //Clean up the DLL
1.12 @@ -710,22 +712,19 @@
1.13
1.14 void CPluginManager::UnregAllConCmds(CPlugin *pl)
1.15 {
1.16 -#if 0
1.17 SourceHook::List<ConCommandBase *>::iterator i;
1.18
1.19 /* :TODO: */
1.20 for (i=pl->m_Cvars.begin(); i!=pl->m_Cvars.end(); i++)
1.21 {
1.22 - g_SMConVarAccessor.Unregister(pl->m_Id, (*i) );
1.23 + g_Metamod.UnregisterConCommandBase(pl->m_Id, (*i) );
1.24 }
1.25 -
1.26 pl->m_Cvars.clear();
1.27
1.28 for (i=pl->m_Cmds.begin(); i!=pl->m_Cmds.end(); i++)
1.29 {
1.30 - g_SMConVarAccessor.Unregister(pl->m_Id, (*i) );
1.31 + g_Metamod.UnregisterConCommandBase(pl->m_Id, (*i) );
1.32 }
1.33 + pl->m_Cmds.clear();
1.34 +}
1.35
1.36 - pl->m_Cmds.clear();
1.37 -#endif
1.38 -}