core/PluginSys.cpp
changeset 3790 98b099a406d2
parent 3703 391951cdde71
     1.1 --- a/core/PluginSys.cpp	Thu Feb 14 19:28:12 2013 -0500
     1.2 +++ b/core/PluginSys.cpp	Sat Feb 16 15:15:22 2013 -0800
     1.3 @@ -823,19 +823,7 @@
     1.4  void CPluginManager::LoadAll_FirstPass(const char *config, const char *basedir)
     1.5  {
     1.6  	/* First read in the database of plugin settings */
     1.7 -	SMCError err;
     1.8 -	SMCStates states;
     1.9  	m_AllPluginsLoaded = false;
    1.10 -	if ((err=textparsers->ParseFile_SMC(config, &m_PluginInfo, &states)) != SMCError_Okay)
    1.11 -	{
    1.12 -		g_Logger.LogError("[SM] Encountered fatal error parsing file \"%s\"", config);
    1.13 -		const char *err_msg = textparsers->GetSMCErrorString(err);
    1.14 -		if (err_msg)
    1.15 -		{
    1.16 -			g_Logger.LogError("[SM] Parse error encountered: \"%s\"", err_msg);
    1.17 -		}
    1.18 -	}
    1.19 -
    1.20  	LoadPluginsFromDir(basedir, NULL);
    1.21  }
    1.22  
    1.23 @@ -909,21 +897,6 @@
    1.24  	}
    1.25  
    1.26  	int err;
    1.27 -	bool no_load = false;
    1.28 -	PluginSettings *pset;
    1.29 -	unsigned int setcount = m_PluginInfo.GetSettingsNum();
    1.30 -	for (unsigned int i=0; i<setcount; i++)
    1.31 -	{
    1.32 -		if ((pset = m_PluginInfo.GetSettingsIfMatch(i, path)) == NULL)
    1.33 -		{
    1.34 -			continue;
    1.35 -		}
    1.36 -		if (pset->blockload_val)
    1.37 -		{
    1.38 -			no_load = true;
    1.39 -			break;
    1.40 -		}
    1.41 -	}
    1.42  
    1.43  	/**
    1.44  	 * Does this plugin already exist?
    1.45 @@ -934,8 +907,7 @@
    1.46  		/* Check to see if we should try reloading it */
    1.47  		if (pPlugin->GetStatus() == Plugin_BadLoad
    1.48  			|| pPlugin->GetStatus() == Plugin_Error
    1.49 -			|| pPlugin->GetStatus() == Plugin_Failed
    1.50 -			|| no_load)
    1.51 +			|| pPlugin->GetStatus() == Plugin_Failed)
    1.52  		{
    1.53  			UnloadPlugin(pPlugin);
    1.54  		}
    1.55 @@ -949,11 +921,6 @@
    1.56  		}
    1.57  	}
    1.58  
    1.59 -	if (no_load)
    1.60 -	{
    1.61 -		return LoadRes_NeverLoad;
    1.62 -	}
    1.63 -
    1.64  	pPlugin = CPlugin::CreatePlugin(path, error, maxlength);
    1.65  
    1.66  	assert(pPlugin != NULL);
    1.67 @@ -967,37 +934,6 @@
    1.68  		co = g_pSourcePawn2->StartCompilation();
    1.69  	}
    1.70  
    1.71 -	for (unsigned int i=0; i<setcount; i++)
    1.72 -	{
    1.73 -		if ((pset=m_PluginInfo.GetSettingsIfMatch(i, path)) == NULL)
    1.74 -		{
    1.75 -			continue;
    1.76 -		}
    1.77 -		pPlugin->m_type = pset->type_val;
    1.78 -		if (co)
    1.79 -		{
    1.80 -			for (unsigned int j=0; j<pset->opts_num; j++)
    1.81 -			{
    1.82 -				const char *key, *val;
    1.83 -				m_PluginInfo.GetOptionsForPlugin(pset, j, &key, &val);
    1.84 -				if (!key || !val)
    1.85 -				{
    1.86 -					continue;
    1.87 -				}
    1.88 -				if ((err = co->SetOption(key, val)) == SP_ERROR_NONE)
    1.89 -				{
    1.90 -					if (error)
    1.91 -					{
    1.92 -						UTIL_Format(error, maxlength, "Unable to set JIT option (key \"%s\") (value \"%s\")", key, val);
    1.93 -					}
    1.94 -					co->Abort();
    1.95 -					co = NULL;
    1.96 -					break;
    1.97 -				}
    1.98 -			}
    1.99 -		}
   1.100 -	}
   1.101 -
   1.102  	/* Do the actual compiling */
   1.103  	if (co != NULL)
   1.104  	{