added new API key, moved after boolean check, added check that sourceban ban was not unbanned
This commit is contained in:
parent
5fcc8fef90
commit
69824f8eed
@ -1,7 +1,7 @@
|
|||||||
#pragma semicolon 1
|
#pragma semicolon 1
|
||||||
#define PLUGIN_AUTHOR "jenz but with stuff from neons vpn checker"
|
#define PLUGIN_AUTHOR "jenz but with stuff from neons vpn checker"
|
||||||
#define PLUGIN_VERSION "1.0"
|
#define PLUGIN_VERSION "1.0"
|
||||||
#define APIKEY "30r040-2w8k51-711148-8118n3"
|
#define APIKEY "mfg242-532328-b34d06-5a8262"
|
||||||
#pragma newdecls optional
|
#pragma newdecls optional
|
||||||
#include <SteamWorks>
|
#include <SteamWorks>
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
@ -201,7 +201,7 @@ public void sql_truncate_sb_bans_shortened(Database db, DBResultSet results, con
|
|||||||
if ((client = GetClientFromSerial(data)) == 0)
|
if ((client = GetClientFromSerial(data)) == 0)
|
||||||
return;
|
return;
|
||||||
char sql_statement[512];
|
char sql_statement[512];
|
||||||
Format(sql_statement, sizeof(sql_statement), "select distinct ip, authid from sb_bans where ip is not null and ip != '' and authid is not null and authid != '' and (ends = created or ends > UNIX_TIMESTAMP())");
|
Format(sql_statement, sizeof(sql_statement), "select distinct ip, authid from sb_bans where ip is not null and ip != '' and authid is not null and authid != '' and (RemoveType != 'U' or RemoveType is NULL) and (ends = created or ends > UNIX_TIMESTAMP())");
|
||||||
g_hDatabase_sourceban.Query(sql_select_sb_bans, sql_statement, GetClientSerial(client), DBPrio_High);
|
g_hDatabase_sourceban.Query(sql_select_sb_bans, sql_statement, GetClientSerial(client), DBPrio_High);
|
||||||
delete results;
|
delete results;
|
||||||
}
|
}
|
||||||
@ -230,6 +230,7 @@ public void sql_select_sb_bans(Database db, DBResultSet results, const char[] er
|
|||||||
results.FetchString(0, sIP, sizeof(sIP));
|
results.FetchString(0, sIP, sizeof(sIP));
|
||||||
results.FetchString(1, sAuthID, sizeof(sAuthID));
|
results.FetchString(1, sAuthID, sizeof(sAuthID));
|
||||||
Format(sql_statement, sizeof(sql_statement), "%s ('%s','%s'),", sql_statement, sAuthID, sIP);
|
Format(sql_statement, sizeof(sql_statement), "%s ('%s','%s'),", sql_statement, sAuthID, sIP);
|
||||||
|
after_result = true;
|
||||||
if (strlen(sql_statement) > 2700)
|
if (strlen(sql_statement) > 2700)
|
||||||
{
|
{
|
||||||
Format(sql_statement, strlen(sql_statement), sql_statement);
|
Format(sql_statement, strlen(sql_statement), sql_statement);
|
||||||
@ -237,7 +238,6 @@ public void sql_select_sb_bans(Database db, DBResultSet results, const char[] er
|
|||||||
Format(sql_statement, sizeof(sql_statement), "INSERT IGNORE INTO `sb_bans_shortened` (`steam_id`,`ipv4`) VALUES ");
|
Format(sql_statement, sizeof(sql_statement), "INSERT IGNORE INTO `sb_bans_shortened` (`steam_id`,`ipv4`) VALUES ");
|
||||||
after_result = false;
|
after_result = false;
|
||||||
}
|
}
|
||||||
after_result = true;
|
|
||||||
}
|
}
|
||||||
Format(sql_statement, strlen(sql_statement), sql_statement);
|
Format(sql_statement, strlen(sql_statement), sql_statement);
|
||||||
if (after_result)
|
if (after_result)
|
||||||
|
Loading…
Reference in New Issue
Block a user