From 27a0f3f00baa309c707fb549767ad6ea9a5f2d60 Mon Sep 17 00:00:00 2001 From: zaCade Date: Sat, 8 Jun 2019 15:42:33 +0200 Subject: [PATCH] Change Native calls ect. --- ConnectAnnounce/scripting/ConnectAnnounce.sp | 4 ++-- Status/scripting/Status.sp | 4 ++-- VPN-Check/scripting/VPN-Check.sp | 24 ++++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ConnectAnnounce/scripting/ConnectAnnounce.sp b/ConnectAnnounce/scripting/ConnectAnnounce.sp index 69b3fb94..f529fa98 100644 --- a/ConnectAnnounce/scripting/ConnectAnnounce.sp +++ b/ConnectAnnounce/scripting/ConnectAnnounce.sp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #pragma newdecls required @@ -375,7 +375,7 @@ public void TQueryCB(Handle owner, Handle rs, const char[] error, any data) if(StrContains(sRawMsg, "{NOSTEAM}")) { - if(!NSM_IsPlayerSteam(client)) + if(!PM_IsPlayerSteam(client)) ReplaceString(sRawMsg, sizeof(sRawMsg), "{NOSTEAM}", " "); else ReplaceString(sRawMsg, sizeof(sRawMsg), "{NOSTEAM}", ""); diff --git a/Status/scripting/Status.sp b/Status/scripting/Status.sp index 52ee2066..fca82f95 100644 --- a/Status/scripting/Status.sp +++ b/Status/scripting/Status.sp @@ -2,7 +2,7 @@ #include #include -#include +#include #tryinclude "serverfps.inc" @@ -175,7 +175,7 @@ public Action Command_Status(int client, const char[] command, int args) if (IsFakeClient(player)) FormatEx(sPlayerType, sizeof(sPlayerType), "FakeClient"); else - NSM_GetPlayerType(player, sPlayerType, sizeof(sPlayerType)); + PM_GetPlayerType(player, sPlayerType, sizeof(sPlayerType)); PrintToConsole(client, "# %8s %40s %24s %12s %4s %4s %10s %16s %s", sPlayerID, sPlayerName, sPlayerAuth, sPlayerTime, sPlayerPing, sPlayerLoss, sPlayerState, sPlayerAddr, sPlayerType); diff --git a/VPN-Check/scripting/VPN-Check.sp b/VPN-Check/scripting/VPN-Check.sp index 06ded4f6..6e6e2e7c 100644 --- a/VPN-Check/scripting/VPN-Check.sp +++ b/VPN-Check/scripting/VPN-Check.sp @@ -3,7 +3,7 @@ #include #undef REQUIRE_PLUGIN -#include +#include #define REQUIRE_PLUGIN @@ -14,7 +14,7 @@ ConVar g_cvBlockNoSteamVPN; int g_bStatus[MAXPLAYERS+1] = {0,...}; -bool g_bNSMLoaded; +bool g_bPMLoaded; //---------------------------------------------------------------------------------------------------- // Purpose: @@ -32,7 +32,7 @@ public Plugin myinfo = //---------------------------------------------------------------------------------------------------- public void OnPluginStart() { - g_cvBlockNoSteamVPN = CreateConVar("sm_nosteam_block_vpn", "1", "Kick nosteamers that use VPN.", FCVAR_NONE, true, 0.0, true, 1.0); + g_cvBlockNoSteamVPN = CreateConVar("sm_vpn_block", "1", "Kick unauthenticated people that use a VPN.", FCVAR_NONE, true, 0.0, true, 1.0); for (int client = 1; client <= MaxClients; client++) { @@ -67,7 +67,7 @@ public void OnPluginStart() //---------------------------------------------------------------------------------------------------- public void OnAllPluginsLoaded() { - g_bNSMLoaded = LibraryExists("NoSteamManager"); + g_bPMLoaded = LibraryExists("PlayerManager"); } //---------------------------------------------------------------------------------------------------- @@ -75,8 +75,8 @@ public void OnAllPluginsLoaded() //---------------------------------------------------------------------------------------------------- public void OnLibraryAdded(const char[] sName) { - if (strcmp(sName, "NoSteamManager", false) == 0) - g_bNSMLoaded = true; + if (strcmp(sName, "PlayerManager", false) == 0) + g_bPMLoaded = true; } //---------------------------------------------------------------------------------------------------- @@ -84,8 +84,8 @@ public void OnLibraryAdded(const char[] sName) //---------------------------------------------------------------------------------------------------- public void OnLibraryRemoved(const char[] sName) { - if (strcmp(sName, "NoSteamManager", false) == 0) - g_bNSMLoaded = false; + if (strcmp(sName, "PlayerManager", false) == 0) + g_bPMLoaded = false; } //---------------------------------------------------------------------------------------------------- @@ -113,9 +113,9 @@ public Action Command_CheckVPN(int client, int args) GetClientAuthId(i, AuthId_Steam2, sSteamID, sizeof(sSteamID)); GetClientIP(i, sIP, sizeof(sIP)); - if (g_bNSMLoaded) + if (g_bPMLoaded) { - if (!NSM_IsPlayerSteam(i)) + if (!PM_IsPlayerSteam(i)) Format(sBuffer, sizeof(sBuffer), "%s\"%L\"[NOSTEAM] is possibly using a VPN (%s).\n", sBuffer, i, sIP); else Format(sBuffer, sizeof(sBuffer), "%s\"%L\"[STEAM] is possibly using a VPN (%s).\n", sBuffer, i, sIP); @@ -236,9 +236,9 @@ public int OnClientPostAdminCheck_OnTransferResponse(char[] sData, int iSerial) { if(IsValidClient(i) && CheckCommandAccess(i, "sm_vpn", ADMFLAG_RCON)) { - if (g_bNSMLoaded) + if (g_bPMLoaded) { - if (!NSM_IsPlayerSteam(client)) + if (!PM_IsPlayerSteam(client)) { if (g_cvBlockNoSteamVPN.BoolValue) {