NoSteamManager_RevEmu: update mysql failure and latest RevEmu API
This commit is contained in:
parent
7316892835
commit
1a854d9e4b
@ -60,7 +60,7 @@ public void OnDatabaseConnect(Database db, const char[] error, any data)
|
||||
if(db == INVALID_HANDLE || strlen(error) > 0)
|
||||
{
|
||||
LogError("Error connecting to database: %s", error);
|
||||
SetFailState("Error connecting to database. Reconnecting on map change.");
|
||||
return;
|
||||
}
|
||||
|
||||
g_hDatabaseAntiSpoofing = db;
|
||||
@ -82,7 +82,7 @@ public Action Command_DisplaySteamStats(int client, int args)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i))
|
||||
{
|
||||
if(!IsSteam(i))
|
||||
if(!RevEmu_IsPlayerSteam(i))
|
||||
{
|
||||
GetClientName(i, aBuf2, sizeof(aBuf2));
|
||||
StrCat(aBuf, sizeof(aBuf), aBuf2);
|
||||
@ -101,7 +101,7 @@ public Action Command_DisplaySteamStats(int client, int args)
|
||||
aBuf = "##################################################\n";
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i) && !IsSteam(i))
|
||||
if(IsClientInGame(i) && !IsFakeClient(i) && !RevEmu_IsPlayerSteam(i))
|
||||
{
|
||||
char sConnectionType[32];
|
||||
GetConnectionType(i, sConnectionType, sizeof(sConnectionType));
|
||||
@ -133,7 +133,7 @@ public bool Filter_Steam(const char[] sPattern, Handle hClients)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i))
|
||||
{
|
||||
if(IsSteam(i))
|
||||
if(RevEmu_IsPlayerSteam(i))
|
||||
PushArrayCell(hClients, i);
|
||||
}
|
||||
}
|
||||
@ -149,7 +149,7 @@ public bool Filter_NoSteam(const char[] sPattern, Handle hClients)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i))
|
||||
{
|
||||
if(!IsSteam(i))
|
||||
if(!RevEmu_IsPlayerSteam(i))
|
||||
PushArrayCell(hClients, i);
|
||||
}
|
||||
}
|
||||
@ -170,7 +170,7 @@ public Action OnClientPreAdminCheck(int client)
|
||||
char sSteamID[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sSteamID, sizeof(sSteamID));
|
||||
|
||||
if(!IsSteam(client))
|
||||
if(!RevEmu_IsPlayerSteam(client))
|
||||
{
|
||||
char sConnectionType[32];
|
||||
GetConnectionType(client, sConnectionType, sizeof(sConnectionType));
|
||||
@ -206,7 +206,7 @@ public void OnClientPostAdminCheck(int client)
|
||||
if(IsFakeClient(client) || IsClientSourceTV(client))
|
||||
return;
|
||||
|
||||
if(!IsSteam(client))
|
||||
if(!RevEmu_IsPlayerSteam(client))
|
||||
{
|
||||
LogMessage("%L was not authenticated with steam, muting client.", client);
|
||||
BaseComm_SetClientMute(client, true);
|
||||
@ -224,6 +224,12 @@ public void TQueryCB(Database db, DBResultSet results, const char[] error, any d
|
||||
if ((client = GetClientOfUserId(data)) == 0)
|
||||
return;
|
||||
|
||||
if(db == INVALID_HANDLE || strlen(error) > 0)
|
||||
{
|
||||
LogError("SQL query errors: %s", error);
|
||||
return;
|
||||
}
|
||||
|
||||
char sSteamID[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sSteamID, sizeof(sSteamID));
|
||||
|
||||
@ -276,7 +282,7 @@ public void GetConnectionType(int client, char[] sConnectionType, int iMaxLength
|
||||
char sConnectionTypeInternal[32];
|
||||
|
||||
RevEmu_UserType PlayerType = RevEmu_GetPlayerType(client);
|
||||
if (PlayerType == Unknown)
|
||||
if (PlayerType == Invalid)
|
||||
sConnectionTypeInternal = "Error";
|
||||
else if (PlayerType == SteamLegitUser)
|
||||
sConnectionTypeInternal = "SteamLegit";
|
||||
@ -302,14 +308,6 @@ public void GetConnectionType(int client, char[] sConnectionType, int iMaxLength
|
||||
strcopy(sConnectionType, iMaxLength, sConnectionTypeInternal);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public bool IsSteam(int client)
|
||||
{
|
||||
return (RevEmu_GetPlayerType(client) == SteamLegitUser);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -318,6 +316,6 @@ public void SQL_DoNothing(Database db, DBResultSet results, const char[] error,
|
||||
if(db == INVALID_HANDLE || strlen(error) > 0)
|
||||
{
|
||||
LogError("SQL query errors: %s", error);
|
||||
SetFailState("Lost connection to database. Reconnecting on map change.");
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user