Change Native calls ect.

This commit is contained in:
zaCade 2019-06-08 15:42:33 +02:00
parent c8aad00bdd
commit 27a0f3f00b
3 changed files with 16 additions and 16 deletions

View File

@ -4,7 +4,7 @@
#include <geoip> #include <geoip>
#include <multicolors> #include <multicolors>
#include <clientprefs> #include <clientprefs>
#include <NoSteamManager> #include <PlayerManager>
#pragma newdecls required #pragma newdecls required
@ -375,7 +375,7 @@ public void TQueryCB(Handle owner, Handle rs, const char[] error, any data)
if(StrContains(sRawMsg, "{NOSTEAM}")) if(StrContains(sRawMsg, "{NOSTEAM}"))
{ {
if(!NSM_IsPlayerSteam(client)) if(!PM_IsPlayerSteam(client))
ReplaceString(sRawMsg, sizeof(sRawMsg), "{NOSTEAM}", " <NoSteam>"); ReplaceString(sRawMsg, sizeof(sRawMsg), "{NOSTEAM}", " <NoSteam>");
else else
ReplaceString(sRawMsg, sizeof(sRawMsg), "{NOSTEAM}", ""); ReplaceString(sRawMsg, sizeof(sRawMsg), "{NOSTEAM}", "");

View File

@ -2,7 +2,7 @@
#include <sourcemod> #include <sourcemod>
#include <sdktools> #include <sdktools>
#include <NoSteamManager> #include <PlayerManager>
#tryinclude "serverfps.inc" #tryinclude "serverfps.inc"
@ -175,7 +175,7 @@ public Action Command_Status(int client, const char[] command, int args)
if (IsFakeClient(player)) if (IsFakeClient(player))
FormatEx(sPlayerType, sizeof(sPlayerType), "FakeClient"); FormatEx(sPlayerType, sizeof(sPlayerType), "FakeClient");
else else
NSM_GetPlayerType(player, sPlayerType, sizeof(sPlayerType)); PM_GetPlayerType(player, sPlayerType, sizeof(sPlayerType));
PrintToConsole(client, "# %8s %40s %24s %12s %4s %4s %10s %16s %s", PrintToConsole(client, "# %8s %40s %24s %12s %4s %4s %10s %16s %s",
sPlayerID, sPlayerName, sPlayerAuth, sPlayerTime, sPlayerPing, sPlayerLoss, sPlayerState, sPlayerAddr, sPlayerType); sPlayerID, sPlayerName, sPlayerAuth, sPlayerTime, sPlayerPing, sPlayerLoss, sPlayerState, sPlayerAddr, sPlayerType);

View File

@ -3,7 +3,7 @@
#include <multicolors> #include <multicolors>
#undef REQUIRE_PLUGIN #undef REQUIRE_PLUGIN
#include <NoSteamManager> #include <PlayerManager>
#define REQUIRE_PLUGIN #define REQUIRE_PLUGIN
@ -14,7 +14,7 @@ ConVar g_cvBlockNoSteamVPN;
int g_bStatus[MAXPLAYERS+1] = {0,...}; int g_bStatus[MAXPLAYERS+1] = {0,...};
bool g_bNSMLoaded; bool g_bPMLoaded;
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// Purpose: // Purpose:
@ -32,7 +32,7 @@ public Plugin myinfo =
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnPluginStart() 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++) for (int client = 1; client <= MaxClients; client++)
{ {
@ -67,7 +67,7 @@ public void OnPluginStart()
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnAllPluginsLoaded() public void OnAllPluginsLoaded()
{ {
g_bNSMLoaded = LibraryExists("NoSteamManager"); g_bPMLoaded = LibraryExists("PlayerManager");
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -75,8 +75,8 @@ public void OnAllPluginsLoaded()
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnLibraryAdded(const char[] sName) public void OnLibraryAdded(const char[] sName)
{ {
if (strcmp(sName, "NoSteamManager", false) == 0) if (strcmp(sName, "PlayerManager", false) == 0)
g_bNSMLoaded = true; g_bPMLoaded = true;
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -84,8 +84,8 @@ public void OnLibraryAdded(const char[] sName)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnLibraryRemoved(const char[] sName) public void OnLibraryRemoved(const char[] sName)
{ {
if (strcmp(sName, "NoSteamManager", false) == 0) if (strcmp(sName, "PlayerManager", false) == 0)
g_bNSMLoaded = false; g_bPMLoaded = false;
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -113,9 +113,9 @@ public Action Command_CheckVPN(int client, int args)
GetClientAuthId(i, AuthId_Steam2, sSteamID, sizeof(sSteamID)); GetClientAuthId(i, AuthId_Steam2, sSteamID, sizeof(sSteamID));
GetClientIP(i, sIP, sizeof(sIP)); 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); Format(sBuffer, sizeof(sBuffer), "%s\"%L\"[NOSTEAM] is possibly using a VPN (%s).\n", sBuffer, i, sIP);
else else
Format(sBuffer, sizeof(sBuffer), "%s\"%L\"[STEAM] is possibly using a VPN (%s).\n", sBuffer, i, sIP); 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(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) if (g_cvBlockNoSteamVPN.BoolValue)
{ {