| 352 | } |
| 353 | |
| 354 | bool CPlugin::OnPluginStart() |
| 355 | { |
| 356 | m_EnteredSecondPass = true; |
| 357 | |
| 358 | if (m_status != Plugin_Loaded) |
| 359 | return false; |
| 360 | m_status = Plugin_Running; |
| 361 | |
| 362 | SyncMaxClients(playerhelpers->GetMaxClients()); |
| 363 | |
| 364 | cell_t result; |
| 365 | IPluginFunction *pFunction = m_pRuntime->GetFunctionByName("OnPluginStart"); |
| 366 | if (!pFunction) |
| 367 | return true; |
| 368 | |
| 369 | int err; |
| 370 | if ((err=pFunction->Execute(&result)) != SP_ERROR_NONE) { |
| 371 | EvictWithError(Plugin_Error, "Error detected in plugin startup (see error logs)"); |
| 372 | return false; |
| 373 | } |
| 374 | return true; |
| 375 | } |
| 376 | |
| 377 | void CPlugin::Call_OnPluginEnd() |
| 378 | { |
no test coverage detected