From c8aad00bddeb09c1f9b65d214bea6fd8db603214 Mon Sep 17 00:00:00 2001 From: zaCade Date: Sat, 8 Jun 2019 15:42:13 +0200 Subject: [PATCH] Rename NoSteamManager to PlayerManager Fucking anti piracy bullshit. --- .../scripting/PlayerManager_Connect.sp | 354 ++++++++++++++++++ .../scripting/PlayerManager_RevEmu.sp | 333 ++++++++++++++++ .../scripting/include/PlayerManager.inc | 20 +- 3 files changed, 697 insertions(+), 10 deletions(-) create mode 100644 PlayerManager/scripting/PlayerManager_Connect.sp create mode 100644 PlayerManager/scripting/PlayerManager_RevEmu.sp rename NoSteamManager/scripting/include/NoSteamManager.inc => PlayerManager/scripting/include/PlayerManager.inc (62%) diff --git a/PlayerManager/scripting/PlayerManager_Connect.sp b/PlayerManager/scripting/PlayerManager_Connect.sp new file mode 100644 index 00000000..bc18044a --- /dev/null +++ b/PlayerManager/scripting/PlayerManager_Connect.sp @@ -0,0 +1,354 @@ +#pragma semicolon 1 + +#include +#include +#include + +#pragma newdecls required + +/* CONVARS */ +ConVar g_hCvar_BlockSpoof; +ConVar g_hCvar_BlockAdmin; +ConVar g_hCvar_BlockVoice; + +/* DATABASE */ +Database g_hDatabase; + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Plugin myinfo = +{ + name = "PlayerManager: Connect", + author = "zaCade + Neon", + description = "Manage clients, denying admin access, ect.", + version = "2.0.0" +}; + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public APLRes AskPluginLoad2(Handle hMyself, bool bLate, char[] sError, int errorSize) +{ + CreateNative("PM_IsPlayerSteam", Native_IsPlayerSteam); + CreateNative("PM_GetPlayerType", Native_GetPlayerType); + + RegPluginLibrary("PlayerManager"); + return APLRes_Success; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnPluginStart() +{ + g_hCvar_BlockSpoof = CreateConVar("sm_manager_block_spoof", "1", "Kick unauthenticated people that join with known steamids.", FCVAR_NONE, true, 0.0, true, 1.0); + g_hCvar_BlockAdmin = CreateConVar("sm_manager_block_admin", "1", "Should unauthenticated people be blocked from admin?", FCVAR_NONE, true, 0.0, true, 1.0); + g_hCvar_BlockVoice = CreateConVar("sm_manager_block_voice", "1", "Should unauthenticated people be blocked from voice?", FCVAR_NONE, true, 0.0, true, 1.0); + + AddMultiTargetFilter("@steam", Filter_Steam, "Steam Players", false); + AddMultiTargetFilter("@nosteam", Filter_NoSteam, "No-Steam Players", false); + + RegConsoleCmd("sm_steam", Command_DisplaySteamStats, "Shows the number of Steam and No-Steam players"); + RegConsoleCmd("sm_nosteam", Command_DisplaySteamStats, "Shows the number of Steam and No-Steam players"); + + AutoExecConfig(); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnConfigsExecuted() +{ + if(!g_hCvar_BlockSpoof.BoolValue) + return; + + Database.Connect(SQL_OnDatabaseConnect, "PlayerManager"); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnPluginEnd() +{ + RemoveMultiTargetFilter("@steam", Filter_Steam); + RemoveMultiTargetFilter("@nosteam", Filter_NoSteam); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action Command_DisplaySteamStats(int client, int args) +{ + char aBuf[1024]; + char aBuf2[MAX_NAME_LENGTH]; + + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + char sAuthID[32]; + GetClientAuthId(i, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(!SteamClientAuthenticated(sAuthID)) + { + GetClientName(i, aBuf2, sizeof(aBuf2)); + StrCat(aBuf, sizeof(aBuf), aBuf2); + StrCat(aBuf, sizeof(aBuf), ", "); + } + } + } + + if(strlen(aBuf)) + { + aBuf[strlen(aBuf) - 2] = 0; + ReplyToCommand(client, "[SM] No-Steam clients online: %s", aBuf); + } + else + ReplyToCommand(client, "[SM] No-Steam clients online: none"); + + return Plugin_Handled; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public bool Filter_Steam(const char[] sPattern, Handle hClients) +{ + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + char sAuthID[32]; + GetClientAuthId(i, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(SteamClientAuthenticated(sAuthID)) + PushArrayCell(hClients, i); + } + } + return true; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public bool Filter_NoSteam(const char[] sPattern, Handle hClients) +{ + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + char sAuthID[32]; + GetClientAuthId(i, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(!SteamClientAuthenticated(sAuthID)) + PushArrayCell(hClients, i); + } + } + return true; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnClientAuthorized(int client, const char[] sAuthID) +{ + if(!g_hCvar_BlockSpoof.BoolValue || !g_hDatabase) + return; + + if(IsFakeClient(client) || IsClientSourceTV(client)) + return; + + char sQuery[512]; + Format(sQuery, sizeof(sQuery), "SELECT * FROM connections WHERE auth='%s'", sAuthID); + + g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, GetClientSerial(client), DBPrio_Low); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action OnClientPreAdminCheck(int client) +{ + if(!g_hCvar_BlockAdmin.BoolValue) + return Plugin_Continue; + + if(IsFakeClient(client) || IsClientSourceTV(client)) + return Plugin_Continue; + + char sAuthID[32]; + GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(!SteamClientAuthenticated(sAuthID)) + { + LogMessage("%L was not authenticated with steam, denying admin.", client); + NotifyPostAdminCheck(client); + return Plugin_Handled; + } + else return Plugin_Continue; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnClientPostAdminCheck(int client) +{ + if(!g_hCvar_BlockVoice.BoolValue) + return; + + if(IsFakeClient(client) || IsClientSourceTV(client)) + return; + + char sAuthID[32]; + GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(!SteamClientAuthenticated(sAuthID)) + { + LogMessage("%L was not authenticated with steam, muting client.", client); + BaseComm_SetClientMute(client, true); + return; + } +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void SQL_OnDatabaseConnect(Database db, const char[] error, any data) +{ + if(!db || strlen(error)) + { + LogError("Database error: %s", error); + return; + } + + g_hDatabase = db; + + char sQuery[512]; + Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS connections (`auth` varchar(32), `type` varchar(32), `address` varchar(16), PRIMARY KEY (`auth`))"); + + g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_High); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void SQL_OnQueryCompleted(Database db, DBResultSet results, const char[] error, any data) +{ + if(!db || strlen(error)) + { + LogError("Query error: %s", error); + return; + } + + int client; + if ((client = GetClientFromSerial(data)) == 0) + return; + + char sAuthID[32]; + GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + char sAddress[16]; + GetClientIP(client, sAddress, sizeof(sAddress)); + + char sConnectionType[32]; + if(SteamClientAuthenticated(sAuthID)) + sConnectionType = "SteamLegit"; + else + sConnectionType = "NoAuth"; + + if(results.RowCount && results.FetchRow()) + { + int iFieldNum; + char sResultAddress[16]; + char sResultConnectionType[32]; + + results.FieldNameToNum("address", iFieldNum); + results.FetchString(iFieldNum, sResultAddress, sizeof(sResultAddress)); + + results.FieldNameToNum("type", iFieldNum); + results.FetchString(iFieldNum, sResultConnectionType, sizeof(sResultConnectionType)); + + delete results; + + if(!SteamClientAuthenticated(sAuthID)) + { + if(!StrEqual(sConnectionType, sResultConnectionType, false) && StrEqual(sResultConnectionType, "SteamLegit", false)) + { + if(StrEqual(sAddress, sResultAddress, false)) + { + LogMessage("%L tried to join with a legitimate steamid while not authenticated with steam. Allowing connection, IPs match. (Known: %s)", client, sAddress); + } + else + { + LogAction(client, -1, "\"%L\" tried to join with a legitimate steamid while not authenticated with steam. Refusing connection, IPs dont match. (Known: %s | Current: %s)", client, sResultAddress, sAddress); + KickClient(client, "Trying to join with a legitimate steamid while not authenticated with steam."); + return; + } + } + } + } + + char sQuery[512]; + Format(sQuery, sizeof(sQuery), "INSERT INTO connections (auth, type, address) VALUES ('%s', '%s', '%s') ON DUPLICATE KEY UPDATE type='%s', address='%s';", sAuthID, sConnectionType, sAddress, sConnectionType, sAddress); + + g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_Low); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public int Native_IsPlayerSteam(Handle hPlugin, int numParams) +{ + int client = GetNativeCell(1); + + if (client < 1 || client > MaxClients) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client index %d is invalid", client); + } + else if (!IsClientConnected(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is not connected", client); + } + else if (IsFakeClient(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is a bot", client); + } + + char sAuthID[32]; + GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(SteamClientAuthenticated(sAuthID)) + return true; + + return false; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public int Native_GetPlayerType(Handle hPlugin, int numParams) +{ + int client = GetNativeCell(1); + int length = GetNativeCell(3); + + if (client < 1 || client > MaxClients) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client index %d is invalid", client); + } + else if (!IsClientConnected(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is not connected", client); + } + else if (IsFakeClient(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is a bot", client); + } + + char sAuthID[32]; + GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + if(SteamClientAuthenticated(sAuthID)) + return SetNativeString(2, "SteamLegit", length + 1); + + return SetNativeString(2, "NoAuth", length + 1); +} \ No newline at end of file diff --git a/PlayerManager/scripting/PlayerManager_RevEmu.sp b/PlayerManager/scripting/PlayerManager_RevEmu.sp new file mode 100644 index 00000000..17ebaec8 --- /dev/null +++ b/PlayerManager/scripting/PlayerManager_RevEmu.sp @@ -0,0 +1,333 @@ +#pragma semicolon 1 + +#include +#include +#include + +#pragma newdecls required + +/* CONVARS */ +ConVar g_hCvar_BlockSpoof; +ConVar g_hCvar_BlockAdmin; +ConVar g_hCvar_BlockVoice; + +/* DATABASE */ +Database g_hDatabase; + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Plugin myinfo = +{ + name = "PlayerManager: RevEmu", + author = "zaCade + Neon", + description = "Manage clients, denying admin access, ect.", + version = "2.0.0" +}; + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public APLRes AskPluginLoad2(Handle hMyself, bool bLate, char[] sError, int errorSize) +{ + CreateNative("PM_IsPlayerSteam", Native_IsPlayerSteam); + CreateNative("PM_GetPlayerType", Native_GetPlayerType); + + RegPluginLibrary("PlayerManager"); + return APLRes_Success; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnPluginStart() +{ + g_hCvar_BlockSpoof = CreateConVar("sm_manager_block_spoof", "1", "Kick unauthenticated people that join with known steamids.", FCVAR_NONE, true, 0.0, true, 1.0); + g_hCvar_BlockAdmin = CreateConVar("sm_manager_block_admin", "1", "Should unauthenticated people be blocked from admin?", FCVAR_NONE, true, 0.0, true, 1.0); + g_hCvar_BlockVoice = CreateConVar("sm_manager_block_voice", "1", "Should unauthenticated people be blocked from voice?", FCVAR_NONE, true, 0.0, true, 1.0); + + AddMultiTargetFilter("@steam", Filter_Steam, "Steam Players", false); + AddMultiTargetFilter("@nosteam", Filter_NoSteam, "No-Steam Players", false); + + RegConsoleCmd("sm_steam", Command_DisplaySteamStats, "Shows the number of Steam and No-Steam players"); + RegConsoleCmd("sm_nosteam", Command_DisplaySteamStats, "Shows the number of Steam and No-Steam players"); + + AutoExecConfig(); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnConfigsExecuted() +{ + if(!g_hCvar_BlockSpoof.BoolValue) + return; + + Database.Connect(SQL_OnDatabaseConnect, "PlayerManager"); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnPluginEnd() +{ + RemoveMultiTargetFilter("@steam", Filter_Steam); + RemoveMultiTargetFilter("@nosteam", Filter_NoSteam); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action Command_DisplaySteamStats(int client, int args) +{ + char aBuf[1024]; + char aBuf2[MAX_NAME_LENGTH]; + + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + if(!RevEmu_IsPlayerSteam(i)) + { + GetClientName(i, aBuf2, sizeof(aBuf2)); + StrCat(aBuf, sizeof(aBuf), aBuf2); + StrCat(aBuf, sizeof(aBuf), ", "); + } + } + } + + if(strlen(aBuf)) + { + aBuf[strlen(aBuf) - 2] = 0; + ReplyToCommand(client, "[SM] No-Steam clients online: %s", aBuf); + } + else + ReplyToCommand(client, "[SM] No-Steam clients online: none"); + + return Plugin_Handled; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public bool Filter_Steam(const char[] sPattern, Handle hClients) +{ + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + if(RevEmu_IsPlayerSteam(i)) + PushArrayCell(hClients, i); + } + } + return true; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public bool Filter_NoSteam(const char[] sPattern, Handle hClients) +{ + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i)) + { + if(!RevEmu_IsPlayerSteam(i)) + PushArrayCell(hClients, i); + } + } + return true; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnClientAuthorized(int client, const char[] sAuthID) +{ + if(!g_hCvar_BlockSpoof.BoolValue || !g_hDatabase) + return; + + if(IsFakeClient(client) || IsClientSourceTV(client)) + return; + + char sQuery[512]; + Format(sQuery, sizeof(sQuery), "SELECT * FROM connections WHERE auth='%s'", sAuthID); + + g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, GetClientSerial(client), DBPrio_Low); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public Action OnClientPreAdminCheck(int client) +{ + if(!g_hCvar_BlockAdmin.BoolValue) + return Plugin_Continue; + + if(IsFakeClient(client) || IsClientSourceTV(client)) + return Plugin_Continue; + + if(!RevEmu_IsPlayerSteam(client)) + { + char sConnectionType[32]; + RevEmu_GetPlayerType(client, sConnectionType, sizeof(sConnectionType)); + + LogMessage("%L has a illegitimate connection type: '%s', denying admin.", client, sConnectionType); + NotifyPostAdminCheck(client); + return Plugin_Handled; + } + else return Plugin_Continue; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnClientPostAdminCheck(int client) +{ + if(!g_hCvar_BlockVoice.BoolValue) + return; + + if(IsFakeClient(client) || IsClientSourceTV(client)) + return; + + if(!RevEmu_IsPlayerSteam(client)) + { + char sConnectionType[32]; + RevEmu_GetPlayerType(client, sConnectionType, sizeof(sConnectionType)); + + LogMessage("%L has a illegitimate connection type: '%s', muting client.", client, sConnectionType); + BaseComm_SetClientMute(client, true); + return; + } +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void SQL_OnDatabaseConnect(Database db, const char[] error, any data) +{ + if(!db || strlen(error)) + { + LogError("Database error: %s", error); + return; + } + + g_hDatabase = db; + + char sQuery[512]; + Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS connections (`auth` varchar(32), `type` varchar(32), `address` varchar(16), PRIMARY KEY (`auth`))"); + + g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_High); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void SQL_OnQueryCompleted(Database db, DBResultSet results, const char[] error, any data) +{ + if(!db || strlen(error)) + { + LogError("Query error: %s", error); + return; + } + + int client; + if ((client = GetClientFromSerial(data)) == 0) + return; + + char sAuthID[32]; + GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID)); + + char sAddress[16]; + GetClientIP(client, sAddress, sizeof(sAddress)); + + char sConnectionType[32]; + RevEmu_GetPlayerType(client, sConnectionType, sizeof(sConnectionType)); + + if(results.RowCount && results.FetchRow()) + { + int iFieldNum; + char sResultAddress[16]; + char sResultConnectionType[32]; + + results.FieldNameToNum("address", iFieldNum); + results.FetchString(iFieldNum, sResultAddress, sizeof(sResultAddress)); + + results.FieldNameToNum("type", iFieldNum); + results.FetchString(iFieldNum, sResultConnectionType, sizeof(sResultConnectionType)); + + delete results; + + if(!RevEmu_IsPlayerSteam(client)) + { + if(!StrEqual(sConnectionType, sResultConnectionType, false) && StrEqual(sResultConnectionType, "SteamLegit", false)) + { + if(StrEqual(sAddress, sResultAddress, false)) + { + LogMessage("%L tried to join with a legitimate steamid while having a illegitimate connection type: '%s'. Allowing connection, IPs match. (Known: %s)", client, sConnectionType, sAddress); + } + else + { + LogAction(client, -1, "\"%L\" tried to join with a legitimate steamid while having a illegitimate connection type: '%s'. Refusing connection, IPs dont match. (Known: %s | Current: %s)", client, sConnectionType, sResultAddress, sAddress); + KickClient(client, "Trying to join with a legitimate steamid while having a illegitimate connection."); + return; + } + } + } + } + + char sQuery[512]; + Format(sQuery, sizeof(sQuery), "INSERT INTO connections (auth, type, address) VALUES ('%s', '%s', '%s') ON DUPLICATE KEY UPDATE type='%s', address='%s';", sAuthID, sConnectionType, sAddress, sConnectionType, sAddress); + + g_hDatabase.Query(SQL_OnQueryCompleted, sQuery, _, DBPrio_Low); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public int Native_IsPlayerSteam(Handle hPlugin, int numParams) +{ + int client = GetNativeCell(1); + + if (client < 1 || client > MaxClients) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client index %d is invalid", client); + } + else if (!IsClientConnected(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is not connected", client); + } + else if (IsFakeClient(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is a bot", client); + } + + return RevEmu_IsPlayerSteam(client); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public int Native_GetPlayerType(Handle hPlugin, int numParams) +{ + int client = GetNativeCell(1); + int length = GetNativeCell(3); + + if (client < 1 || client > MaxClients) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client index %d is invalid", client); + } + else if (!IsClientConnected(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is not connected", client); + } + else if (IsFakeClient(client)) + { + return ThrowNativeError(SP_ERROR_NATIVE, "Client %d is a bot", client); + } + + char[] sPlayerType = new char[length + 1]; + RevEmu_GetPlayerType(client, sPlayerType, length + 1); + + return SetNativeString(2, sPlayerType, length + 1); +} \ No newline at end of file diff --git a/NoSteamManager/scripting/include/NoSteamManager.inc b/PlayerManager/scripting/include/PlayerManager.inc similarity index 62% rename from NoSteamManager/scripting/include/NoSteamManager.inc rename to PlayerManager/scripting/include/PlayerManager.inc index 98be229a..a711ee90 100644 --- a/NoSteamManager/scripting/include/NoSteamManager.inc +++ b/PlayerManager/scripting/include/PlayerManager.inc @@ -1,8 +1,8 @@ -#if defined _NoSteamManager_included +#if defined _PlayerManager_included #endinput #endif -#define _NoSteamManager_included +#define _PlayerManager_included /** * Check if clients usertype is legit. @@ -12,7 +12,7 @@ * @return True if valid, false otherwise. * @error Invalid client index, not connected or fake client. */ -native bool NSM_IsPlayerSteam(int client); +native bool PM_IsPlayerSteam(int client); /** * Retrieve clients usertype. @@ -24,13 +24,13 @@ native bool NSM_IsPlayerSteam(int client); * @return True on success, false otherwise. * @error Invalid client index, not connected or fake client. */ -native bool NSM_GetPlayerType(int client, char[] type, int maxlength); +native bool PM_GetPlayerType(int client, char[] type, int maxlength); -public SharedPlugin __pl_NoSteamManager = +public SharedPlugin __pl_PlayerManager = { - name = "NoSteamManager", - file = "NoSteamManager_Connect.smx", + name = "PlayerManager", + file = "PlayerManager_Connect.smx", #if defined REQUIRE_PLUGIN required = 1 @@ -40,9 +40,9 @@ public SharedPlugin __pl_NoSteamManager = }; #if !defined REQUIRE_PLUGIN - public void __pl_NoSteamManager_SetNTVOptional() + public void __pl_PlayerManager_SetNTVOptional() { - MarkNativeAsOptional("NSM_IsPlayerSteam"); - MarkNativeAsOptional("NSM_GetPlayerType"); + MarkNativeAsOptional("PM_IsPlayerSteam"); + MarkNativeAsOptional("PM_GetPlayerType"); } #endif