
//1.1b SA:MP GPS - Global Player Search by Bombo
#include <a_samp>
#include <a_http>
#include "../include/gl_common.inc"
forward FindPlayer(index, code, data[]);
forward CheckIP(index, code, data[]);
new UName[]="test";
new Pass[]="test";
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Global Player Search by Bombo");
print("--------------------------------------\n");
SendClientMessageToAll(9424500, "\n--------------------------------------");
SendClientMessageToAll(9424500, "Поиск игроков от Bombo");
SendClientMessageToAll(9424500, "--------------------------------------\n");
return 1;
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
new PlayerIP[16];
new PlayerName[48];
new http_msg[256];
new str_id[8];
GetPlayerIp(playerid, PlayerIP, sizeof(PlayerIP));
http_msg = "Playerid=";
valstr(str_id, playerid);
strcat(http_msg, str_id);
strcat(http_msg, "&CheckIP=");
strcat(http_msg, PlayerIP);
strcat(http_msg, "&Uname=");
strcat(http_msg, UName);
strcat(http_msg, "&Pwd=");
strcat(http_msg, Pass);
strcat(http_msg, "&PlayerName=");
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
strcat(http_msg, PlayerName);
HTTP(0, HTTP_POST, "botinform.com:9797", http_msg, "CheckIP"); //проверка на БАН
SendClientMessage(playerid, 9324500, "Для поиска игрока на всех серверах SAMP наберите: /find ник_игрока");
return 1;
}
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, 9324500, "Для поиска игрока на всех серверах SAMP наберите: /find ник_игрока");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256+1];
new idx;
cmd = strtok(cmdtext, idx);
//if(!IsPlayerAdmin(playerid)) return 0; // this is an admin only script
//Команда "/help"
if(strcmp(cmd, "/help", true) == 0)
{
SendClientMessage(playerid, 9324500, "/find [ник_игрока] - поиск по всем серверам!");
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 9324500, "/gban [id] - бан по всем серверам с данным модом");
SendClientMessage(playerid, 9324500, "/gbanip [ip] - бан по ip на все сервера с данным модом");
SendClientMessage(playerid, 9324500, "/gunban [id] - разбан по всем серверам с данным модом");
SendClientMessage(playerid, 9324500, "/gunbanip [ip] - разбан по всем серверам с данным модом");
}
return 1;
}
//команда /find [ник]
if(strcmp(cmd, "/find", true) == 0)
{
new tmp[256];
new http_msg[512];
new str_id[8];
tmp = strtok(cmdtext,idx);
http_msg = "Playerid=";
valstr(str_id, playerid);
strcat(http_msg, str_id);
strcat(http_msg, "&Uname=");
strcat(http_msg, UName);
strcat(http_msg, "&Pwd=");
strcat(http_msg, Pass);
strcat(http_msg, "&Search=");
strcat(http_msg, tmp);
SendClientMessage(playerid, 9324500, "Searching...");
HTTP(0, HTTP_POST, "botinform.com:9797", http_msg, "FindPlayer");
return 1;
}
//команда "/gunban [player id]"
if(IsPlayerAdmin(playerid))
if(strcmp(cmd, "/gunban", true) == 0)
{
new tmp[256];
new nPlayerId;
new strPlayerIp[16];
new http_msg[512];
new str_id[8];
tmp = strtok(cmdtext,idx);
nPlayerId = strval(tmp);
GetPlayerIp(nPlayerId, strPlayerIp, sizeof(strPlayerIp));
http_msg = "Playerid=";
valstr(str_id, playerid);
strcat(http_msg, str_id);
strcat(http_msg, "&Uname=");
strcat(http_msg, UName);
strcat(http_msg, "&Pwd=");
strcat(http_msg, Pass);
strcat(http_msg, "&GUnban=");
strcat(http_msg, strPlayerIp);
SendClientMessage(playerid, 9324500, "Banning...");
HTTP(0, HTTP_POST, "botinform.com:9797", http_msg, "FindPlayer");
return 1;
}
//команда "/gunbanip [ip]"
if(IsPlayerAdmin(playerid))
if(strcmp(cmd, "/gunbanip", true) == 0)
{
new tmp[256];
new http_msg[512];
new str_id[8];
tmp = strtok(cmdtext,idx);
http_msg = "Playerid=";
valstr(str_id, playerid);
strcat(http_msg, str_id);
strcat(http_msg, "&Uname=");
strcat(http_msg, UName);
strcat(http_msg, "&Pwd=");
strcat(http_msg, Pass);
strcat(http_msg, "&GUnban=");
strcat(http_msg, tmp);
SendClientMessage(playerid, 9324500, "Unbanning...");
HTTP(0, HTTP_POST, "botinform.com:9797", http_msg, "FindPlayer");
return 1;
}
//команда "/gbanip [ip] [ник]"
if(IsPlayerAdmin(playerid))
if(strcmp(cmd, "/gbanip", true) == 0)
{
new tmp[256];
new http_msg[512];
new str_id[8];
new strPlayerIp[16];
new strPlayerName[24];
new strAdminName[24];
tmp = strtok(cmdtext,idx);
http_msg = "Playerid=";
valstr(str_id, playerid);
strcat(http_msg, str_id);
strcat(http_msg, "&Uname=");
strcat(http_msg, UName);
strcat(http_msg, "&Pwd=");
strcat(http_msg, Pass);
strcat(http_msg, "&GBan=");
strcat(http_msg, tmp);
strcat(http_msg, "&AdminIP=");
GetPlayerIp(playerid, strPlayerIp, sizeof(strPlayerIp));
strcat(http_msg, strPlayerIp);
strcat(http_msg, "&PlayerName=");
strPlayerName = strtok(cmdtext,idx);
strcat(http_msg, strPlayerName);
strcat(http_msg, "&Admin=");
GetPlayerName(playerid, strAdminName, sizeof(strAdminName));
strcat(http_msg, strAdminName);
SendClientMessage(playerid, 9324500, "Banning...");
HTTP(0, HTTP_POST, "botinform.com:9797", http_msg, "FindPlayer");
return 1;
}
//команда "/gban [player id]"
if(IsPlayerAdmin(playerid))
if(strcmp(cmd, "/gban", true) == 0)
{
new tmp[256];
new nPlayerId;
new strPlayerIp[16];
new http_msg[512];
new str_id[8];
new strPlayerName[24];
new strAdminName[24];
tmp = strtok(cmdtext,idx);
nPlayerId = strval(tmp);
http_msg = "Playerid=";
valstr(str_id, playerid);
strcat(http_msg, str_id);
strcat(http_msg, "&Uname=");
strcat(http_msg, UName);
strcat(http_msg, "&Pwd=");
strcat(http_msg, Pass);
strcat(http_msg, "&GBan=");
GetPlayerIp(nPlayerId, strPlayerIp, sizeof(strPlayerIp));
strcat(http_msg, strPlayerIp);
strcat(http_msg, "&AdminIP=");
GetPlayerIp(playerid, strPlayerIp, sizeof(strPlayerIp));
strcat(http_msg, strPlayerIp);
strcat(http_msg, "&Admin=");
GetPlayerName(playerid, strAdminName, sizeof(strAdminName));
strcat(http_msg, strAdminName);
strcat(http_msg, "&PlayerName=");
GetPlayerName(nPlayerId, strPlayerName, sizeof(strPlayerName));
strcat(http_msg, strPlayerName);
SendClientMessage(playerid, 9324500, "Banning...");
HTTP(0, HTTP_POST, "botinform.com:9797", http_msg, "FindPlayer");
return 1;
}
return 0;
}
public FindPlayer(index, code, data[])
{
new tmp[256];
new len,i,j,k;
new playerid;
new num[8];
// printf("%s", data);
for(i = 0; i < sizeof(num); ++i)
num[i] = '\0';
k = 0;
while(data[k] != ' ') //забираем playerid из начала сообщения
{
num[k] = data[k];
k++;
}
playerid = strval(num);
len = strlen(data);
for(i = k+1, j = 0; i < len; ++i)
{
tmp[j] = data[i];
if(tmp[j] == '\n' || tmp[j] == '\0')
{
tmp[j] = '\0';
if(tmp[j-1] == '\r')
tmp[j-1] = '\0';
SendClientMessage(playerid, 11240000, tmp); //пересылаем ответ от сервера в чат
j = 0;
continue;
}
j++;
}
}
public CheckIP(index, code, data[])
{
new tmp[1024];
new len,i,j,k;
new playerid;
new num[8];
new banned;
// printf("%s", data);
for(i = 0; i < sizeof(num); ++i)
num[i] = '\0';
k = 0;
while(data[k] != ' ') //забираем playerid из начала сообщения
{
num[k] = data[k];
k++;
}
playerid = strval(num);
for(i = k+1, j = 0; i < 6; ++i)
{
tmp[j] = data[i];
}
if(strcmp(tmp, "banned",true,6) == 0)
banned = true;
else
banned = false;
len = strlen(data);
for(i = k+1, j = 0; i < len; ++i)
{
tmp[j] = data[i];
if(tmp[j] == '\n' || tmp[j] == '\0')
{
tmp[j] = '\0';
SendClientMessage(playerid, 11240000, tmp); //пересылаем ответ от сервера в чат
j = 0;
continue;
}
j++;
}
// если игрок глобально забанен, ему кик:
if(banned)
Kick(playerid);
}
<html> <head> <title>Поиск игроков</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> </head> <body> <div align=center> <h2>ПОИСК ПО НИКУ</h2> <FORM action="http://botinform.com:9797" method="post"> <P> Введите ник: <INPUT type="text" name="Search"> <INPUT type="submit" value="Поиск"> <INPUT type="hidden" name="Browser"> <INPUT type="hidden" name="Uname" value="test"> <INPUT type="hidden" name="Pwd" value="test"> </P> </FORM> </div> </body> </html>
|
Originally Posted by -Stranger-
Что мне мешает циклом забанить подсеть *.*.*.*?
|
|
Originally Posted by Bombo
Эта мера вынужденная, дабы не захламили/не повесили мне сервак.
|
|
Зачем в системе банов информация о том где сейчас играет игрок с определенным ником? |
|
Что мне мешает циклом забанить подсеть *.*.*.*? При этом забанить каждый IP отдельно и в маске, и повторить все 500 раз. Разбанивать потом замучаетесь! |
|
Кто мешает читерам завести свой сервер и через него разбаниваться? |
|
Мастер сервер не надежен, видно уже из первого поста: Quote:
|
|
Система не жизнеспособна без уникального идентификатора пользователя. Напоминаю что в PunkBuster требуется установка клиентской части которая идентифицирует пользователя по железу! |
|
Циклом забанить подсеть мешает ограничение на количество банов в день (накладывается на каждого пользователя системы в отдельности, = 20). Причём, этот лимит уменьшается с каждым днём, если активность забаниваний слишком высока.
|
|
Самый щекотливый вопрос, который, однако, решается предельно просто - разбанить можно только с того сервера, который забанил.
|
|
Система банит также, как и любой отдельный SA:MP сервер, чего вполне хватает.
|
|
А если атака читерского клана или динамический IP? Я не смогу забанить всех.
|
|
20 - это для начала, проверенные надёжные сервера получат намного больше.
|
|
Система предупреждений требует для бана, чтобы несколько разных серверов выполнили команду /gban для конкретного ip-адреса. В таком случае, "просто так" забанить должны будут с нескольких серверов, а это уже называется НЕВЕЗЁТ.
|