Counter-Strike 1.6
CS1.BG | DUST2 NOSHTA GARMI [RANKED PLAY] #1
45.144.155.113:27015
de_dust2
Играчи: 30/32
de_dust2
Counter-Strike 1.6
Cs-PlovdiV.com - Aim Attack 93.123.16.4:27022 aim_aztec Играчи: 0/16

Reklama Problem Plugin

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Reklama Problem Plugin

Мнение от lantimilan » 08 Апр 2020, 10:41

Hello do you have any idea very much people reclama in my server one SERVERS BUY ML PLAYERS , some other show IP in chat look in photo :
https://prnt.sc/rv87lf

I found one : im not user if it okey

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <amxmisc>
#include <regex>

// Preprocessor macros (Config)
#define PLAYER_NEWNAME		"Player"
#define IN_GAME_WARNING_MSG	"Warning! Do not advertise sites or other servers"
#define NICK_CHANGED_INFO	"Nick has been changed! Do not push back the name of the site or server"
#define MSG_BLOCK_INFO		"Advertising on your behalf, please do not advertise other sites/servers"

new g_newname_num = 1

public plugin_init()
{
	register_plugin("Anti-Spam Lite", "1.0.4", "NullWarez")
	register_clcmd("say","check_player_msg")
	register_clcmd("say_team","check_player_msg")
}

// Check the nick when connecting
public client_putinserver(id)
{
	if(is_user_admin(id))
		return PLUGIN_CONTINUE

	new g_name[32]
	get_user_name(id, g_name,31)

	if(is_invalid(g_name))
	{
		server_cmd("amx_nick #%d ^"PLAYER_NEWNAME-%d^"", get_user_userid(id), g_newname_num);
		g_newname_num++
		set_hudmessage (200, 0, 0, -1.0, 0.35, 1, 0.0, 5.0, 1.0, 1.0, 1)
		show_hudmessage(id, "NICK_CHANGED_INFO");
	}
	set_task(20.0, "showWarning", id)
	return PLUGIN_CONTINUE
}

// Checks the message for spam
bool:is_invalid(const text[])
{
	new error[50], num
	new Regex:regex = regex_match (text, "[a-z0-9-]{3,}\.[a-z]{1,2}(\S)", num, error, 49, "i")
	if(regex >= REGEX_OK)
	{
		regex_free(regex)
		return true
	}

	regex = regex_match(text, "([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}", num, error, 49)
	if(regex >= REGEX_OK)
    {
		regex_free(regex)
		return true
	}

	return false
}

// Displays a warning ban for spam
public showWarning(id)
{
	if(is_user_connected(id))
		client_print(id, print_chat, "IN_GAME_WARNING_MSG")
}

// Check say or say_team message
public check_player_msg(id)
{
	if(is_user_admin(id))
		return PLUGIN_CONTINUE

	new text[128]
	read_args(text,127)
	if(is_invalid(text))
	{
		client_print(id, print_chat, "MSG_BLOCK_INFO")
		return PLUGIN_HANDLED
    }
	return PLUGIN_CONTINUE
}

// Called when set name
public client_infochanged(id)
{
	if(is_user_admin(id))
		return PLUGIN_CONTINUE

	if(!is_user_alive(id)) // loop fix
		return PLUGIN_CONTINUE

	new g_name[32]
	get_user_name(id, g_name,31)

	if(is_invalid(g_name))
	{
		server_cmd("amx_nick #%d ^"PLAYER_NEWNAME-%d^"", get_user_userid(id), g_newname_num);
		g_newname_num++
		set_hudmessage (200, 0, 0, -1.0, 0.35, 1, 0.0, 5.0, 1.0, 1.0, 1)
		show_hudmessage(id, "NICK_CHANGED_INFO");
	}
	return PLUGIN_CONTINUE
}

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1296 пъти
Обратна връзка:

Reklama Problem Plugin

Мнение от OciXCrom » 08 Апр 2020, 15:18

Well, did you test it?

Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Reklama Problem Plugin

Мнение от lantimilan » 08 Апр 2020, 16:20

No i find one in forum, is very good working you cna close this thread :D

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot] и 6 госта