i outcommented kickclient since madness figured out that you get kicked if you dont have a working spray, i was able to replicate that myself
This commit is contained in:
parent
c6d13222ae
commit
80a593a31d
@ -71,7 +71,8 @@ public Plugin myinfo =
|
|||||||
|
|
||||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
||||||
{
|
{
|
||||||
g_iEngine = GetEngineVersion();
|
g_iEngine = GetEngineVersion();
|
||||||
|
return APLRes_Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPluginStart()
|
public void OnPluginStart()
|
||||||
@ -114,21 +115,22 @@ public Action CmdSprays(int client, int a)
|
|||||||
|
|
||||||
public Action TimerNext(Handle timer, DataPack dPack)
|
public Action TimerNext(Handle timer, DataPack dPack)
|
||||||
{
|
{
|
||||||
DirectoryListing hDir;
|
DirectoryListing hDir;
|
||||||
char sDir[PLATFORM_MAX_PATH];
|
char sDir[PLATFORM_MAX_PATH];
|
||||||
int client, count, counts, level;
|
int client, count, counts, level;
|
||||||
bool recurse;
|
bool recurse;
|
||||||
|
|
||||||
dPack.Reset();
|
dPack.Reset();
|
||||||
client = dPack.ReadCell();
|
client = dPack.ReadCell();
|
||||||
recurse = dPack.ReadCell();
|
recurse = dPack.ReadCell();
|
||||||
dPack.ReadString(sDir, sizeof(sDir));
|
dPack.ReadString(sDir, sizeof(sDir));
|
||||||
count = dPack.ReadCell();
|
count = dPack.ReadCell();
|
||||||
counts = dPack.ReadCell();
|
counts = dPack.ReadCell();
|
||||||
level = dPack.ReadCell();
|
level = dPack.ReadCell();
|
||||||
hDir = 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)
|
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);
|
LogCustom("Deleted invalid spray: %s", g_sFilename);
|
||||||
PrintToServer("Invalid file: %s: %02d (%02X <> %02X)", g_sFilename, i, iRead[i], g_iVal[i]);
|
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);
|
DeleteFile(g_sFilename);
|
||||||
|
|
||||||
@ -232,7 +235,7 @@ public MRESReturn FileReceived(int pThis, Handle hReturn, Handle hParams)
|
|||||||
{
|
{
|
||||||
char auth[20];
|
char auth[20];
|
||||||
GetClientAuthId(j, AuthId_Steam2, auth, sizeof(auth));
|
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);
|
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);
|
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];
|
char auth[20];
|
||||||
GetClientAuthId(j, AuthId_Steam2, auth, sizeof(auth));
|
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);
|
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);
|
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 false;
|
||||||
|
|
||||||
return IsClientInGame(client);
|
return IsClientInGame(client);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user