WebAdmin should not cause crashes anymore
Got rid of cWebPlugin_Lua cPlugin_Lua is also a cWebPlugin now, so plugins don't need a separate cWebPlugin object Changed some stuff to use AString instead of char* git-svn-id: http://mc-server.googlecode.com/svn/trunk@777 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -623,11 +623,11 @@ bool cPluginManager::CallHookUpdatedSign(cWorld * a_World, int a_BlockX, int a_B
|
||||
|
||||
|
||||
|
||||
cPlugin* cPluginManager::GetPlugin( const char* a_Plugin ) const
|
||||
cPlugin* cPluginManager::GetPlugin( const AString & a_Plugin ) const
|
||||
{
|
||||
for( PluginList::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr )
|
||||
{
|
||||
if (strcmp((*itr)->GetName(), a_Plugin) == 0 )
|
||||
if ((*itr)->GetName().compare(a_Plugin) == 0)
|
||||
{
|
||||
return *itr;
|
||||
}
|
||||
@@ -657,8 +657,6 @@ void cPluginManager::UnloadPluginsNow()
|
||||
cPlugin_Lua* LuaPlugin = *m_LuaPlugins.begin();
|
||||
if( LuaPlugin )
|
||||
{
|
||||
cWebAdmin* WebAdmin = cRoot::Get()->GetWebAdmin();
|
||||
if( WebAdmin ) WebAdmin->RemovePlugin( LuaPlugin->GetLuaState() );
|
||||
delete LuaPlugin;
|
||||
}
|
||||
m_LuaPlugins.remove( LuaPlugin );
|
||||
|
||||
Reference in New Issue
Block a user