if its the webclient just filter out all chat messages with ; or " in them
This commit is contained in:
parent
4a9a8e06cf
commit
5a1ca4959d
@ -2,6 +2,7 @@
|
|||||||
#include <PlayerManager>
|
#include <PlayerManager>
|
||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <basecomm>
|
#include <basecomm>
|
||||||
|
#include <ccc>
|
||||||
#include <clientprefs>
|
#include <clientprefs>
|
||||||
#include <selfmute>
|
#include <selfmute>
|
||||||
#include <voice>
|
#include <voice>
|
||||||
@ -13,6 +14,7 @@ Handle g_hCheckMutes = null;
|
|||||||
Handle g_hCookieTorchMuted = null;
|
Handle g_hCookieTorchMuted = null;
|
||||||
|
|
||||||
bool g_bWasChecked[MAXPLAYERS + 1];
|
bool g_bWasChecked[MAXPLAYERS + 1];
|
||||||
|
bool g_bWebclient[MAXPLAYERS + 1];
|
||||||
|
|
||||||
public Plugin myinfo =
|
public Plugin myinfo =
|
||||||
{
|
{
|
||||||
@ -64,6 +66,7 @@ public Action check_mutes(Handle timer, any data)
|
|||||||
char dummy[64];
|
char dummy[64];
|
||||||
OnClientAuthorized(i, dummy);
|
OnClientAuthorized(i, dummy);
|
||||||
set_webclient_listen_override(i);
|
set_webclient_listen_override(i);
|
||||||
|
g_bWebclient[i] = true;
|
||||||
}
|
}
|
||||||
for (int j = 1; j <= MaxClients; j++)
|
for (int j = 1; j <= MaxClients; j++)
|
||||||
{
|
{
|
||||||
@ -107,11 +110,13 @@ public Action check_mutes(Handle timer, any data)
|
|||||||
public void OnClientDisconnect(int client)
|
public void OnClientDisconnect(int client)
|
||||||
{
|
{
|
||||||
g_bWasChecked[client] = false;
|
g_bWasChecked[client] = false;
|
||||||
|
g_bWebclient[client] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClientAuthorized(int client, const char[] auth)
|
public void OnClientAuthorized(int client, const char[] auth)
|
||||||
{
|
{
|
||||||
g_bWasChecked[client] = true;
|
g_bWasChecked[client] = true;
|
||||||
|
g_bWebclient[client] = false;
|
||||||
if (IsFakeClient(client))
|
if (IsFakeClient(client))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -131,6 +136,21 @@ public void OnClientAuthorized(int client, const char[] auth)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Action CCC_OnChatMessage(int client, int author, const char[] message)
|
||||||
|
{
|
||||||
|
if (!g_bWebclient[client])
|
||||||
|
{
|
||||||
|
return Plugin_Continue;
|
||||||
|
}
|
||||||
|
int index = FindCharInString(message, '"', false);
|
||||||
|
int index1 = FindCharInString(message, ';', false);
|
||||||
|
if (index != -1 || index1 != -1)
|
||||||
|
{
|
||||||
|
return Plugin_Handled;
|
||||||
|
}
|
||||||
|
return Plugin_Continue;
|
||||||
|
}
|
||||||
|
|
||||||
public Action Timer_SendVoiceInit(Handle timer, int Serial)
|
public Action Timer_SendVoiceInit(Handle timer, int Serial)
|
||||||
{
|
{
|
||||||
int client;
|
int client;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user