updated query to exclude empty fingerprints and null fingerprints

This commit is contained in:
jenz 2024-02-18 11:37:43 +01:00
parent 0165361efc
commit 155c8198a4

View File

@ -184,7 +184,7 @@ public Action SQL_Select_fingerprints(Handle hTimer, int Serial)
GetClientIP(client, sIP, sizeof(sIP));
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
//steamID is unique but fingerprint might occur multiple times.
Format(sQuery, sizeof(sQuery), "select steamid from ban_detector.ban_detector where fingerprint = (select fingerprint from ban_detector.ban_detector where steamid = '%s')", sSID);
Format(sQuery, sizeof(sQuery), "select steamid from ban_detector.ban_detector where fingerprint = (select fingerprint from ban_detector.ban_detector where steamid = '%s' and fingerprint is not null and length(fingerprint) > 5)", sSID);
//PrintToChatAll("sQuery: %s", sQuery);
g_dDatabase.Query(SQL_FindFingerPrints, sQuery, Serial, DBPrio_Low);
}