forked from UNLOZE/sm-plugins
fix UNLOZE+ReservedSlots
fix dependency unload error in a few plugins with LibraryExists in OnAllPluginsLoaded
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
|
||||
#undef REQUIRE_PLUGIN
|
||||
#include <AFKManager>
|
||||
#include <GFLClanru>
|
||||
#include <unloze>
|
||||
#define REQUIRE_PLUGIN
|
||||
|
||||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
bool g_Plugin_AFKManager;
|
||||
bool g_Plugin_GFLClanru;
|
||||
bool g_Plugin_UNLOZE;
|
||||
|
||||
int g_Client_Reservation[MAXPLAYERS + 1] = {0, ...};
|
||||
|
||||
@@ -37,13 +37,16 @@ public void OnPluginStart()
|
||||
public void OnAllPluginsLoaded()
|
||||
{
|
||||
g_Plugin_AFKManager = LibraryExists("AFKManager");
|
||||
g_Plugin_GFLClanru = LibraryExists("GFLClanru");
|
||||
g_Plugin_UNLOZE = LibraryExists("UNLOZE_ForumIntegration");
|
||||
|
||||
LogMessage("ReservedSlots capabilities:\nAFKManager: %s\nGFLClanru: %s\nentWatch: %s",
|
||||
LogMessage("ReservedSlots capabilities:\nAFKManager: %s\nUNLOZE: %s\n",
|
||||
(g_Plugin_AFKManager ? "loaded" : "not loaded"),
|
||||
(g_Plugin_GFLClanru ? "loaded" : "not loaded"));
|
||||
(g_Plugin_UNLOZE ? "loaded" : "not loaded"));
|
||||
}
|
||||
|
||||
public void OnLibraryAdded(const char[] name) { OnAllPluginsLoaded(); }
|
||||
public void OnLibraryRemoved(const char[] name) { OnAllPluginsLoaded(); }
|
||||
|
||||
public void OnClientPostAdminCheck(int client)
|
||||
{
|
||||
AdminId admin = GetUserAdmin(client);
|
||||
@@ -87,7 +90,7 @@ public EConnect OnClientPreConnectEx(const char[] sName, char sPassword[255], co
|
||||
return k_OnClientPreConnectEx_Accept;
|
||||
}
|
||||
|
||||
if(g_Plugin_GFLClanru)
|
||||
if(g_Plugin_UNLOZE)
|
||||
{
|
||||
DataPack pack = new DataPack();
|
||||
pack.WriteCell(admin);
|
||||
|
||||
Reference in New Issue
Block a user