diff --git a/spray_exploit_fixer/scripting/spray_exploit_fixer.sp b/spray_exploit_fixer/scripting/spray_exploit_fixer.sp index d61092e..f1815c7 100644 --- a/spray_exploit_fixer/scripting/spray_exploit_fixer.sp +++ b/spray_exploit_fixer/scripting/spray_exploit_fixer.sp @@ -71,7 +71,8 @@ public Plugin myinfo = public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) { - g_iEngine = GetEngineVersion(); + g_iEngine = GetEngineVersion(); + return APLRes_Success; } public void OnPluginStart() @@ -114,21 +115,22 @@ public Action CmdSprays(int client, int a) public Action TimerNext(Handle timer, DataPack dPack) { - DirectoryListing hDir; - char sDir[PLATFORM_MAX_PATH]; - int client, count, counts, level; - bool recurse; + DirectoryListing hDir; + char sDir[PLATFORM_MAX_PATH]; + int client, count, counts, level; + bool recurse; - dPack.Reset(); - client = dPack.ReadCell(); - recurse = dPack.ReadCell(); - dPack.ReadString(sDir, sizeof(sDir)); - count = dPack.ReadCell(); - counts = dPack.ReadCell(); - level = dPack.ReadCell(); - hDir = dPack.ReadCell(); + dPack.Reset(); + client = dPack.ReadCell(); + recurse = dPack.ReadCell(); + dPack.ReadString(sDir, sizeof(sDir)); + count = dPack.ReadCell(); + counts = dPack.ReadCell(); + level = dPack.ReadCell(); + hDir = dPack.ReadCell(); - RecursiveSearchDirs(client, recurse, sDir, count, counts, level, hDir); + RecursiveSearchDirs(client, recurse, sDir, count, counts, level, hDir); + return Plugin_Handled; } void RecursiveSearchDirs(int client, bool recurse, const char[] sDir, int &count, int &counts, int level, DirectoryListing hDir) @@ -218,6 +220,7 @@ public MRESReturn FileReceived(int pThis, Handle hReturn, Handle hParams) { LogCustom("Deleted invalid spray: %s", g_sFilename); PrintToServer("Invalid file: %s: %02d (%02X <> %02X)", g_sFilename, i, iRead[i], g_iVal[i]); + //LogCustom("Invalid file: %s: %02d (%02X <> %02X)", g_sFilename, i, iRead[i], g_iVal[i]); DeleteFile(g_sFilename); @@ -232,7 +235,7 @@ public MRESReturn FileReceived(int pThis, Handle hReturn, Handle hParams) { char auth[20]; GetClientAuthId(j, AuthId_Steam2, auth, sizeof(auth)); - KickClient(j, "Please change your spray"); + //KickClient(j, "Please change your spray"); //if you have no spray you get flagged too by mistake. so better to remove kicking. LogAction(j, -1, "\"%L\" is possibly using a bad spray. Client got kicked and spray got deleted.", j); LogCustom("Deleted invalid spray: %s from (%N) [%s]", sTemp2, j, auth); } @@ -296,7 +299,7 @@ public MRESReturn FileReceivedPost(int pThis, Handle hReturn, Handle hParams) { char auth[20]; GetClientAuthId(j, AuthId_Steam2, auth, sizeof(auth)); - KickClient(j, "Please change your spray"); + KickClient(j, "Please change your spray "); LogAction(j, -1, "\"%L\" is possibly using a bad spray. Client got kicked and spray got deleted.", j); LogCustom("Deleted invalid spray: %s from (%N) [%s]", sTemp, j, auth); } @@ -400,4 +403,4 @@ stock int IsValidClient(int client, bool nobots = true) return false; return IsClientInGame(client); -} \ No newline at end of file +}