fixed sourceban sql query
This commit is contained in:
parent
510edee8a1
commit
156607f443
@ -140,8 +140,10 @@ public void SQL_checkSourcebans(Database db, DBResultSet results, const char[] e
|
|||||||
results.FetchString(0, sSID, sizeof(sSID));
|
results.FetchString(0, sSID, sizeof(sSID));
|
||||||
results.FetchString(1, sIP, sizeof(sIP));
|
results.FetchString(1, sIP, sizeof(sIP));
|
||||||
char sql_statement[512];
|
char sql_statement[512];
|
||||||
|
//PrintToChatAll(sSID);
|
||||||
|
//PrintToChatAll(sIP);
|
||||||
// + 3600 for one hour to accomdate timezone difference
|
// + 3600 for one hour to accomdate timezone difference
|
||||||
Format(sql_statement, sizeof(sql_statement), "select authid, ip from sb_bans where (ip = '%s' or authid = '%s') and (RemoveType != 'U' or RemoveType is NULL) and (ends > UNIX_TIMESTAMP() + 3600 or ends = created) order by created desc limit 1", sIP, sSID);
|
Format(sql_statement, sizeof(sql_statement), "select authid, ip from sb_bans where ((ip = '%s' and ip is not null and ip != '') or (authid = '%s' and authid is not null and authid =! '')) and (RemoveType != 'U' or RemoveType is NULL) and (ends > UNIX_TIMESTAMP() + 3600 or ends = created) order by created desc limit 1", sIP, sSID);
|
||||||
g_hDatabase_sourceban.Query(sql_select_sb_bans, sql_statement, client, DBPrio_High);
|
g_hDatabase_sourceban.Query(sql_select_sb_bans, sql_statement, client, DBPrio_High);
|
||||||
}
|
}
|
||||||
delete results;
|
delete results;
|
||||||
|
Loading…
Reference in New Issue
Block a user