It is currently 21 Jul 2018 08:58





This topic is locked, you cannot edit posts or make further replies.  [ 31 posts ]  Go to page Previous  1, 2, 3
 Servicii de hosting premium - NXWEB.ro | Reduceri 15% 
Author Message
Super moderator
Super moderator
User avatar

Joined: 24 Mar 2011 23:32
Posts: 4997
Location: Caracal
Detinator Steam: Da
Reputatie: Super Moderator
Moderatorul anului 2016
Intermediar
Fond eXtream: 0
Dupa cum vezi gazduirea jocuri momentan nu este activa si ai dreptate in privinta aceasta, o sa fie un dedicat separat doar pentru jocuri doar ca aici intervin upgrade-urile si mai intai trebuie "perfectionat" dedicatul unde isi face aparitia gazduirea web si chiar si vps-urile. Dupa cum stii, de exemplu cpanel dar si sistemele de operare de pe vps-uri consuma mult si pentru asta e nevoie de stocare asa ca mai bine un ssd decat acel upgrade pentru dedicatul pentru servere de jocuri.

Cloudflare este foarte bun doar pentru cei care stiu sa-l configureze, aici intevine si partea de minify, nu te axezi doar pe acea protectie ddos. https://iphostinfo.com/cloudflare/ nu am pus ancora pentru ca majoritatea nu o vad asa ca iti spun ca este foarte usor sa aflii ip-ul dedicat/shared. Protectia despre care spun nu se refera doar la ddos, se refera si la alte atacuri asa ca am spus foarte bine despre htpasswd si chiar si de permisiunile fisierelor pentru ca degeaba exista protectia ddos daca site-ul este vulnerabil in alte parti si nu i se pot oferi sfaturi clientului. Eu mai mult ma bazez pe viteza de incarcare a paginilor, sa nu existe erori din cauza extensiilor php. Ddos in 2018 nu mai exista, insa erori da si daca vreau sa invat ceva atunci trebuie sa experimentez.

@(c) xLd^: Depinde de parteneriate, de bugetul disponibil si mai ales de capabilitate. Mai bine se avanseaza incet dar sigur decat rapid si gresit. Un error_log este mult mai rau decat un atac ddos care se poate rezolva fata de un script nefunctional care poate lua zile intregi de rezolvare. Degeaba serviciile sunt de calitate daca suportul nu este intocmai potrivit si cel de la tehnic iti spune sa apelezi la un programator. Mereu am fost costient ca fiecare actiune are un risc si mereu mi-am asumat, asta fac acum.


12 Jul 2018 11:41
Profile multumesc WWW
Moderator
Moderator

Joined: 24 Mar 2013 10:36
Posts: 1894
Location: Brasov
Detinator Steam: Da
Detinator server CS: Nu
SteamID: id/xldcs
Reputatie: Moderator
Membru Club eXtreamCS (8 Iun - 8 Aug)
Fond eXtream: 0
Mutex wrote:
Dupa cum vezi gazduirea jocuri momentan nu este activa si ai dreptate in privinta aceasta, o sa fie un dedicat separat doar pentru jocuri doar ca aici intervin upgrade-urile si mai intai trebuie "perfectionat" dedicatul unde isi face aparitia gazduirea web si chiar si vps-urile. Dupa cum stii, de exemplu cpanel dar si sistemele de operare de pe vps-uri consuma mult si pentru asta e nevoie de stocare asa ca mai bine un ssd decat acel upgrade pentru dedicatul pentru servere de jocuri.

Cloudflare este foarte bun doar pentru cei care stiu sa-l configureze, aici intevine si partea de minify, nu te axezi doar pe acea protectie ddos. https://iphostinfo.com/cloudflare/ nu am pus ancora pentru ca majoritatea nu o vad asa ca iti spun ca este foarte usor sa aflii ip-ul dedicat/shared. Protectia despre care spun nu se refera doar la ddos, se refera si la alte atacuri asa ca am spus foarte bine despre htpasswd si chiar si de permisiunile fisierelor pentru ca degeaba exista protectia ddos daca site-ul este vulnerabil in alte parti si nu i se pot oferi sfaturi clientului. Eu mai mult ma bazez pe viteza de incarcare a paginilor, sa nu existe erori din cauza extensiilor php. Ddos in 2018 nu mai exista, insa erori da si daca vreau sa invat ceva atunci trebuie sa experimentez.

@(c) xLd^: Depinde de parteneriate, de bugetul disponibil si mai ales de capabilitate. Mai bine se avanseaza incet dar sigur decat rapid si gresit. Un error_log este mult mai rau decat un atac ddos care se poate rezolva fata de un script nefunctional care poate lua zile intregi de rezolvare. Degeaba serviciile sunt de calitate daca suportul nu este intocmai potrivit si cel de la tehnic iti spune sa apelezi la un programator. Mereu am fost costient ca fiecare actiune are un risc si mereu mi-am asumat, asta fac acum.



Ddos in 2018 nu mai exista?
Nu fi asa sigur, cauta-ma o data si iti arat ca exista mai ales daca te axezi si pe servere jocuri/voce. Exista din belsug, mai ales cand vine vorba de locul pe gametracker al serverelor de orice tip.
Nu mai stiu pe ce topic ma uitam(tot promovat) unde majoritatea raspundeau cu, calitate buna, protectie slaba sau print-uri cum era site-ul offline. Insa prostul din ziua de azi ce stie, sa dea un atac micut cu un stresser probabil care va tine un site maxim 5 minute offline, insa ei sunt "hacheri"

Treaba cu dezvoltatul rapid , am facut-o prima oara si sti bine ce a iesit, e bine cum gandesti.

_________________


12 Jul 2018 17:08
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0

Joined: 03 Jan 2016 19:49
Posts: 26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
(c) xLd^ wrote:
Ddos in 2018 nu mai exista?
Nu fi asa sigur, cauta-ma o data si iti arat ca exista mai ales daca te axezi si pe servere jocuri/voce. Exista din belsug, mai ales cand vine vorba de locul pe gametracker al serverelor de orice tip.
Nu mai stiu pe ce topic ma uitam(tot promovat) unde majoritatea raspundeau cu, calitate buna, protectie slaba sau print-uri cum era site-ul offline. Insa prostul din ziua de azi ce stie, sa dea un atac micut cu un stresser probabil care va tine un site maxim 5 minute offline, insa ei sunt "hacheri"

Treaba cu dezvoltatul rapid , am facut-o prima oara si sti bine ce a iesit, e bine cum gandesti.



Doar copii care nu au ce face acasa vor da flood cu stresser sau prin alta metoda ca na... el fiind copil mic si viseaza sa fie un "haker" adevarat.. penibil


12 Jul 2018 17:35
Profile multumesc WWW
Moderator
Moderator

Joined: 24 Mar 2013 10:36
Posts: 1894
Location: Brasov
Detinator Steam: Da
Detinator server CS: Nu
SteamID: id/xldcs
Reputatie: Moderator
Membru Club eXtreamCS (8 Iun - 8 Aug)
Fond eXtream: 0
NixSecure wrote:
(c) xLd^ wrote:
Ddos in 2018 nu mai exista?
Nu fi asa sigur, cauta-ma o data si iti arat ca exista mai ales daca te axezi si pe servere jocuri/voce. Exista din belsug, mai ales cand vine vorba de locul pe gametracker al serverelor de orice tip.
Nu mai stiu pe ce topic ma uitam(tot promovat) unde majoritatea raspundeau cu, calitate buna, protectie slaba sau print-uri cum era site-ul offline. Insa prostul din ziua de azi ce stie, sa dea un atac micut cu un stresser probabil care va tine un site maxim 5 minute offline, insa ei sunt "hacheri"

Treaba cu dezvoltatul rapid , am facut-o prima oara si sti bine ce a iesit, e bine cum gandesti.



Doar copii care nu au ce face acasa vor da flood cu stresser sau prin alta metoda ca na... el fiind copil mic si viseaza sa fie un "haker" adevarat.. penibil


Eu am dat exemple, cel putin serverele de jocuri/voce care urca in top vor avea atacuri la greu. Eu unu nu m-am referit neaparat la copii, ci mai mult la mediul international unde sunt si copii si persoane mai in varsta care pot face foarte multe ca sa zic asa.

_________________


12 Jul 2018 17:55
Profile multumesc YIM WWW
Super moderator
Super moderator
User avatar

Joined: 24 Mar 2011 23:32
Posts: 4997
Location: Caracal
Detinator Steam: Da
Reputatie: Super Moderator
Moderatorul anului 2016
Intermediar
Fond eXtream: 0
A fost adaugata cu succes si plata prin sms taxabil. Reducere 15% la toate serviciile pana pe 18 iulie prin intermediul cuponului de reducere REDUCERE15.


12 Jul 2018 18:30
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 12 Feb 2016 14:47
Posts: 45
Location: Kiev
Detinator Steam: Da
Fond eXtream: 0
Mutex wrote:
NixSecure wrote:
Mutex wrote:
Daca cineva doreste sa incerce un serviciu, poate sa cumpere iar conform legii prin plata paypal/transfer bancar sau alta modalitate care permite legal refund atunci clientul poate solicita refund.

Cel putin, la gazduirea web nu prea as avea multe de adaugat, litespeed impreuna cu cloudlinux fac o treaba excelenta pentru cei care tin la viteza de incarcare a paginilor. Inca o imbunatatire ar fi cloudflare care, daca este configurat corect poate asigura si protectie dos/ddos.


Pai si daca clientul nu doreste cloudflare? inseamna ca protectia este egal cu 0 no ?


Cauta mai exact ce inseamna un atac dos/ddos si despre cum filtreaza un echipament fizic (il poti atinge) un atac si cum o face un serviciu de acest gen, cloudflare. La gazduire web nu sunt probleme, insa la vps/dedicat daca intr-adevar se vrea protectie ddos (nu doar strategii marketing) atunci clientul trebuie sa plateasca o anumita suma de bani pentru 5gbps, 10gbps, 100gbps samd.

Nu doar un serviciu precum cloudflare ofera protectie, ci si permisiunile fisierelor, htpasswd, un modul in cazul unui cms. In cazul unui vps se poate apela la suport tehnic standard/premium care presupune de la instalarea modulelor php pana la monitorizarea permanenta a vps-ului. In cazul website-urilor pe vps, te poti intalni deseori de probleme de bind/named si nu multa lume ofera suport pentru asa ceva. De cele mai multe ori, raspunsul firmelor de hosting va fi acela de a contacta programatorul pentru ca ei ofera suport doar pe partea hardware. In cazul nxweb, noi oferim management mai mult decat standard pentru vps-uri (orice problema poate fi dificila dar asta nu inseamna imposibil de rezolvat). Daca exista probleme, prin ticket se rezolva totul nu postand pe forum sau mai stiu eu unde.


Salut, cloudflare free nu-ti ofera si protectie 100% impotriva tuturor atacurilor si in special layer 7 daca vrei protectie de la ei trebuie sa platesti de la 20 euro in sus in functie de pachet, in general un atac se filtreaza prin firewall-uri.
Sa-ti arat un mic exemplu am luat firma de host mxhost pe care toti ati laudato si ridicato in slavi si am testat cloudflare-ul care il are cu un mic flood.

Image
Image

Bineinteles ca baietii au zis ca nu ofera protectie 100% ci exact cum ofera mai toti deci cloudflare nu te protejeaza am facut aceasta comparatie sa vedeti ca nu are nici o legatura primaria cu prefectura :')
Daca vreti protectie ddos pe toate layerile va recomand blazinfast.io asa cum recomanda si cei de la mxhost :')

Adrian Chiruta
Echipa de asistență
Va recomand in afara tarii la cei de la https://blazingfast.io . Am recomandat unor clienti care aveau foarte des probleme de atacuri DDOS aceasta companie si au fost multumiti.

Cu stima,
Adrian Chiruta

Image

Mutex wrote:
Abia acum am ajuns acasa si pot sa raspund la feedback.

Prima data o sa incep cu partea de cloudflare ca tot se insista. Desigur, exista si riscuri daca se pune cloudflare, unul dintre ele ar fi rezultatele cu peste -20% in serp daca setarile sunt facute gresit. Ganditi-va la serverele de jocuri, sa luam de exemplu tni care are un plugin bun pentru securitate. Asa este si aici, nu doar firma trebuie sa asigure protectie, ci si clientul. Niciodata nu am spus si nu voi spune ca recomand cloudflare. Orice lucru are avantaje si dezavantaje, daca cineva va vrea sa-ti faca rau cu siguranta ti-o va face si cu si fara cloudflare.

@ssn: As vrea sa te intreb daca ai avut un site la care ai muncit destul de mult, mai ales pe partea de content. Gazduirea web se schimba nu este problema. Daca ti-ar strica munca si nu ai mai putea sa recuperezi sau sa trebuiasca sa schimbi domeniul din cauza unor penalitati in serp ar fi o mare problema. Nu trage linia doar la dos/ddos pentru ca in 2018 lumea nu se mai gandeste la flood stand pe skype cu semintele langa laptop. Cand cineva discuta cu tine vede daca se poate intelege cu tine, altfel il pierzi ca si client. Te-ar ajuta daca pe site ar exista strategii de marketing (totusi informatii vor exista in scurt timp)? Protectie exista, insa cand te referi la protectie niciodata nu o sa existe acel DA, o sa existe doar POATE. Defineste te rog ce inseamna protectie, ce vrei tu de la o firma.


Acum sa vorbim si despre cs cum poti sa zici ca tni are un plugin bun de protectie :') acel plugin e pentru bugurile de engine ale hlds-ului atat :') la fel ca si cei de la krond amandoua sunt pistol cu apa fata de alte plugine mai complexe si parola rcon nu se poate afla voi o oferiti ca nu stiti sa configurati bine serverele sa mai explicat chestia asta intr-un topic :')

tni_bug_fix :')
| Afiseaza codul
#pragma semicolon 1
#pragma ctrlchar '\'

new cfg_file[15] =
{
116, 110, 105, 95, 98, 117, 103, 102, 105, 120, 46, 99, 102, 103, 0
}
new tag[16] =
{
4, 91, 84, 78, 73, 32, 83, 121, 115, 116, 101, 109, 115, 93, 1, 0
}
new g_Incercaricmd[33];
new g_Incercaricfg[33];
new g_Incercarispec[33];
new g_verify[33];
new g_spectator[33];
new cvar_cmdbug;
new cvar_deletevault;
new cvar_antispec;
new cvar_info;
new cvar_cmdbug_punish;
new cvar_autobuy;
new cvar_antiflood;
new cvar_antiflood_punish;
new cvar_logs;
new cvar_antispec_punish;
new g_SayText;
new g_MaximumClients;
new g_msgTeamInfo;
new cvar_blockmotd;
new bool:saw[33];
new g_Restrictie[8][] =
{
"fullupdate",
"echo_off",
"gX4takingfire",
"echo_on",
"gX4sticktog",
"gX4regroup",
"gX4holdpos",
"gX4getout"
};
new CSA_Kick[14][] =
{
"#Cstrike",
"#Cstrike_GIGN_Label",
"#Cstrike_Spetsnaz_Label",
"_GIGN_Label",
"_Spetsnaz_Label",
"#Cstrike_",
"_Label",
"_Spetsnaz",
"_HELP",
"_Duck",
"#Spec_Help_Text",
"#Spec_Duck",
"_TEXT",
"#Spec"
};
new CSA_NickChange[3][] =
{
"#",
"%",
"+"
};
new CSA_NoChat[4][] =
{
"#",
"%",
"+",
"#C"
};

replace_all(String:string[], len, String:what[], String:with[])
{
new pos = 0;
new var1 = contain(string, what);
pos = var1;
if (var1 == -1)
{
return 0;
}
new total = 0;
new with_len = strlen(with);
new diff = strlen(what) - with_len;
new total_len = strlen(string);
new temp_pos = 0;
while (replace(string[pos], len - pos, what, with))
{
total++;
pos = with_len + pos;
total_len -= diff;
if (pos >= total_len)
{
return total;
}
else
{
temp_pos = contain(string[pos], what);
if (temp_pos == -1)
{
return total;
}
else
{
pos = temp_pos + pos;
}
return total;
}
return total;
}
return total;
}

get_configsdir(String:name[], len)
{
return get_localinfo("amxx_configsdir", name, len);
}

bool:CheckLicense(String:Site[])
{
new Error = 0;
new Request[512];
new Length = 0;
new Socket = 0;
new Data[1024];
Socket = socket_open(Site, 80, 1, Error);
Length = formatex(Request, 511, "GET /licv2.php HTTP/1.0\nHost:%s\nUser-Agent: TNI BUG_FIX Plugin %s\n\r\n\r\n\r", Site, "1.7.6");
socket_send(Socket, Request, Length);
socket_recv(Socket, Data, 1023);
if (containi(Data, "0xFFFF") != -1)
{
socket_close(Socket);
return true;
}
socket_close(Socket);
return false;
}

public plugin_init()
{
register_plugin("Bug Fix by TNI", "1.7.6", "TNI System");
register_clcmd("say", "handleSay", -1, "", -1);
register_clcmd("say_team", "handleSay", -1, "", -1);
register_clcmd("cl_setautobuy", "cmd_check", -1, "", -1);
register_clcmd("cl_setrebuy", "cmd_check", -1, "", -1);
register_clcmd("joinclass", "clcmd_joinclass", -1, "", -1);
new i = 0;
while (i < 8)
{
register_clcmd(g_Restrictie[i][0][0], "cmdRestrict", -1, "", -1);
i++;
}
cvar_info = register_cvar("tni_advertise", "1", 0, 0.00);
cvar_cmdbug = register_cvar("tni_cmdbug", "1", 0, 0.00);
cvar_cmdbug_punish = register_cvar("tni_cmdbug_punish", "1", 0, 0.00);
cvar_antispec = register_cvar("tni_antispec", "1", 0, 0.00);
cvar_antispec_punish = register_cvar("tni_antispec_punish", "1", 0, 0.00);
cvar_antiflood = register_cvar("tni_cfgflood", "1", 0, 0.00);
cvar_antiflood_punish = register_cvar("tni_cfgflood_punish", "1", 0, 0.00);
cvar_autobuy = register_cvar("tni_autobuy", "1", 0, 0.00);
cvar_blockmotd = register_cvar("tni_blockmotd", "1", 0, 0.00);
cvar_deletevault = register_cvar("tni_deletevault", "1", 0, 0.00);
cvar_logs = register_cvar("tni_logs", "1", 0, 0.00);
register_forward(FM_ClientUserInfoChanged, "ClientUserInfoChanged", 0);
register_message(get_user_msgid("MOTD"), "message_MOTD");
register_message(g_msgTeamInfo, "message_teaminfo");
g_SayText = get_user_msgid("SayText");
g_msgTeamInfo = get_user_msgid("TeamInfo");
g_MaximumClients = get_maxplayers();
if (!CheckLicense("www.tni.ro"))
{
set_fail_state("[TNI Systems] Nu detii o licenta valida a pluginului. Viziteaza http://www.tni.ro.
}
else
{
server_print("\n\9 [TNI System License] : GENUINE: Your server is authorized, Thank you.\n");
}
if (get_pcvar_num(cvar_info))
{
set_task(300.00, "Task_Message", 172, "", 0, "b", 0);
}
return 0;
}

public Task_Message()
{
ColoredPrint(0, false, "\4Acest server foloseste\3 %s\4 versiunea\3 %s\1 (www.tni.ro)", "Bug Fix by TNI", "1.7.6");
return 0;
}

public plugin_cfg()
{
static cfg_dir[32];
get_configsdir(cfg_dir, 31);
server_cmd("exec %s/%s", cfg_dir, cfg_file);
return 0;
}

public client_putinserver(id)
{
g_Incercaricmd[id] = 0;
g_Incercaricfg[id] = 0;
g_Incercarispec[id] = 0;
g_verify[id] = 0;
return 0;
}

public client_connect(id)
{
!!! Removed Phi
new szName[64];
new szAuthId[32];
new szIp[32];
new timestr[64];
get_user_name(id, szName, 63);
get_user_authid(id, szAuthId, 31);
get_user_ip(id, szIp, 31, 1);
saw[id] = 0;
static i;
i = 0;
while (i < 14)
{
if (containi(szName, CSA_Kick[i][0][0]) != -1)
{
server_cmd("kick #%d \"[TNI Systems] Please change your nick.\"", get_user_userid(id));
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 63);
log_to_file(timestr, "[TNI Systems] [ Name: %s | IP: ( %s ) | SteamID: %s ] incearca sa se conecteze cu un nume de bug, am hotarat ca e mai bine sa-ti dam un kick.", szName, szIp, szAuthId);
i += 1;
}
i += 1;
}
return 1;
}

public client_disconnect(id)
{
remove_task(id, 0);
return 0;
}

public task_delay_reconnect(id)
{
if (is_user_connected(id))
{
client_cmd(id, ";Reconnect");
}
return 0;
}

public cmd_check(id)
{
if (get_pcvar_num(cvar_autobuy) == 1)
{
static timestr[64];
static szAdress[20];
static szName[32];
static i;
static args;
static arg[512];
get_user_name(id, szName, 31);
get_user_ip(id, szAdress, 19, 1);
args = read_argc();
i = 1;
while (i < args)
{
read_argv(i, arg, 511);
if (is_cmd_long(arg, 511))
{
new var1 = g_verify[id];
var1++;
if (3 < var1[0][0])
{
client_cmd(id, ";Disconnect");
server_cmd("kick #%d Use autobuy bug!", get_user_userid(id));
}
else
{
client_cmd(id, ";Motdfile autobuy.txt");
client_cmd(id, ";Motd_write %s", "m4a1 ak47 famas galil p90 mp5 primammo secammo defuser vesthelm vest");
client_cmd(id, ";Motdfile motd.txt");
if (get_pcvar_num(cvar_logs))
{
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 63);
log_to_file(timestr, "[TNI Systems] AUTO BUY: %s ( %s ) a incercat sa dea crash serverului printr-un bug.", szName, szAdress);
}
ColoredPrint(id, false, "%s Esti suspectat de\3 AUTO Buy\1 vei primi\4 reconnect\1 la urmatoarea incercare", tag);
set_task(1.00, "task_delay_reconnect", id, "", 0, "", 0);
}
return 1;
}
i += 1;
}
}
return 0;
}

public handleSay(id)
{
!!! Removed Phi
new arg[192];
new szName[32];
new szAuthId[32];
new szAdress[20];
new timestr[99];
read_argv(1, arg, 191);
get_user_name(id, szName, 31);
get_user_ip(id, szAdress, 19, 1);
if (1 <= get_pcvar_num(cvar_cmdbug))
{
if (containi(arg, "%s") != -1)
{
if (1 <= g_Incercaricmd[id][0][0])
{
switch (get_pcvar_num(cvar_cmdbug))
{
case 1:
{
server_cmd("kick #%d \"You have been kicked by TNI Bug Fix\"", get_user_userid(id));
}
case 2:
{
server_cmd("amx_banip \"%s\" %d exploit", szName, get_pcvar_num(cvar_cmdbug_punish));
}
case 3:
{
server_cmd("amx_banip %s 0 exploit", szName);
}
default:
{
}
}
}
g_Incercaricmd[id]++;
new var1;
if (get_pcvar_num(cvar_cmdbug) == 1)
{
var1 = 11044;
}
else
{
var1 = 11064;
}
ColoredPrint(id, false, "%s Esti suspectat de\3 CMD Bug\1 vei primi\4 %s\1 la urmatoarea incercare", tag, var1);
if (get_pcvar_num(cvar_logs))
{
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 98);
log_to_file(timestr, "[TNI Systems] CMD BUG: %s ( %s ) a incercat sa dea crash serverului.", szName, szAdress);
}
return 1;
}
}
new s_Arg[192];
read_args(s_Arg, 191);
remove_quotes(s_Arg);
new i = 0;
while (i < 4)
{
if (contain(s_Arg, CSA_NoChat[i][0][0]) != -1)
{
new said[2];
read_argv(1, said, 1);
if (said[0] != 64)
{
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 98);
log_to_file(timestr, "[TNI Systems] CHATBUG: [ Name: %s | IP: ( %s ) | SteamID: %s ] incearca sa foloseasca chat-ul pentru a da crash la server. Am blocat comanda cu succes", szName, szAdress, szAuthId);
return 1;
}
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 98);
log_to_file(timestr, "[TNI Systems] CHATBUG: [ Name: %s | IP: ( %s ) | SteamID: %s ] incearca sa foloseasca chat-ul pentru a da crash la server. Am blocat comanda cu succes", szName, szAdress, szAuthId);
return 1;
}
i++;
}
if (get_pcvar_num(cvar_info))
{
if (equali(arg, "/antiflood", 0))
{
ColoredPrint(id, false, "%s Acest server foloseste\3 %s\1 versiunea\4 %s", tag, "Bug Fix by TNI", "1.7.6");
}
}
return 0;
}

public cmdRestrict(id)
{
!!! Removed Phi
if (get_admin(id))
{
return 1;
}
static timestr[64];
static szAdress[20];
static szName[32];
get_user_name(id, szName, 31);
get_user_ip(id, szAdress, 19, 1);
if (get_pcvar_num(cvar_antiflood))
{
if (1 <= g_Incercaricfg[id][0][0])
{
switch (get_pcvar_num(cvar_antiflood))
{
case 1:
{
server_cmd("kick #%d \"You have been kicked by TNI Bug Fix\"", get_user_userid(id));
}
case 2:
{
server_cmd("amx_banip \"%s\" %d exploit", szName, get_pcvar_num(cvar_antiflood_punish));
}
case 3:
{
server_cmd("amx_banip %s 0 exploit", szName);
}
default:
{
}
}
}
g_Incercaricfg[id]++;
new var1;
if (get_pcvar_num(cvar_antiflood) == 1)
{
var1 = 14452;
}
else
{
var1 = 14472;
}
ColoredPrint(id, false, "%s Esti suspectat de\3 CFG Flood\1 vei primi\4 %s\1 la urmatoarea incercare", tag, var1);
if (get_pcvar_num(cvar_logs))
{
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 63);
log_to_file(timestr, "[TNI Systems] CFG FLOOD: %s ( %s ) a incercat sa dea crash serverului.", szName, szAdress);
}
return 1;
}
return 0;
}

public message_teaminfo(msg_id, msg_dest)
{
!!! Removed Phi
if (msg_dest != 2 && msg_dest)
{
return 0;
}
static team[2];
static id;
id = get_msg_arg_int(1);
get_msg_arg_string(2, "", 1);
if (team[0][0] != 83)
{
g_spectator[id] = 0;
return 0;
}
g_spectator[id] = 1;
return 0;
}

public clcmd_joinclass(id)
{
!!! Removed Phi
if (1 <= get_pcvar_num(cvar_antispec))
{
static timestr[64];
static szAdress[20];
static szName[32];
get_user_name(id, szName, 31);
get_user_ip(id, szAdress, 19, 1);
if (!g_spectator[id][0][0])
{
return 0;
}
if (1 <= g_Incercarispec[id][0][0])
{
switch (get_pcvar_num(cvar_antispec))
{
case 1:
{
server_cmd("kick #%d \"You have been kicked by TNI Bug Fix\"", get_user_userid(id));
}
case 2:
{
server_cmd("amx_banip \"%s\" %d exploit", szName, get_pcvar_num(cvar_antispec_punish));
}
case 3:
{
server_cmd("amx_banip %s 0 exploit", szName);
}
default:
{
}
}
}
g_Incercarispec[id]++;
new var1;
if (get_pcvar_num(cvar_antispec) == 1)
{
var1 = 16064;
}
else
{
var1 = 16084;
}
ColoredPrint(id, false, "%s Esti suspectat de\3 SPEC Bug\1 vei primi\4 %s\1 la urmatoarea incercare", tag, var1);
if (get_pcvar_num(cvar_logs))
{
get_time("addons/amxmodx/logs/TNI_%d.%m.%Y.log", timestr, 63);
log_to_file(timestr, "[TNI Systems] SPEC BUG: %s ( %s ) a incercat sa dea crash serverului.", szName, szAdress);
}
}
return 1;
}

public ClientUserInfoChanged(id)
{
!!! Removed Phi
static name[5] =
{
110, 97, 109, 101, 0
}
static szNewName[32];
static szOldName[32];
pev(id, pev_netname, szOldName, 31);
if (szOldName[0][0])
{
get_user_info(id, name, szNewName, 31);
new s_Arg[192];
read_args(s_Arg, 191);
remove_quotes(s_Arg);
new i = 0;
while (i < 3)
{
if (containi(s_Arg, CSA_NickChange[i][0][0]) != -1)
{
console_print(id, "[TNI Systems] Folosesti caractere interzise, te rugam sa alegi alt nick.");
set_user_info(id, name, szOldName);
return 2;
}
set_user_info(id, name, szNewName);
i++;
}
}
return 1;
}

public message_MOTD(MsgId, MsgDest, MsgEntity)
{
!!! Removed Phi
if (!saw[MsgEntity][0][0] && get_pcvar_num(cvar_blockmotd) == 1)
{
if (get_msg_arg_int(1) == 1)
{
saw[MsgEntity] = 1;
return 1;
}
}
return 0;
}

public plugin_end()
{
if (get_pcvar_num(cvar_deletevault) == 1)
{
new szDir[22];
szDir[0] = 17096;
new DirPointer = 0;
new szFile[32];
DirPointer = open_dir(szDir, "", 0);
while (next_file(DirPointer, szFile, 31))
{
if (szFile[0] == 46)
{
}
else
{
if (equali(szFile, "vault.ini", 0))
{
delete_file(szFile);
close_dir(DirPointer);
}
}
}
close_dir(DirPointer);
}
return 0;
}

SendSayText(Client, bool:Gray, String:String[])
{
message_begin(MSG_ONE_UNRELIABLE, g_SayText, 17228, Client);
new var1;
if (Gray)
{
var1 = g_MaximumClients + 1;
}
else
{
var1 = Client;
}
write_byte(var1);
write_string(String);
message_end();
return 0;
}

ColoredPrint(Client, bool:Gray, String:Format[])
{
!!! Removed Phi
static Iterator;
static Buffer[256];
vformat(Buffer, 255, Format, 4);
replace_all(Buffer, 255, "!g", "\4");
replace_all(Buffer, 255, "!y", "\1");
replace_all(Buffer, 255, "!t", "\3");
switch (is_user_connected(Client))
{
case 0:
{
Iterator = 1;
while (Iterator <= g_MaximumClients)
{
if (is_user_connected(Iterator) && !is_user_hltv(Iterator) && !is_user_bot(Iterator))
{
SendSayText(Iterator, Gray, Buffer);
Iterator += 1;
}
Iterator += 1;
}
}
case 1:
{
SendSayText(Client, Gray, Buffer);
}
default:
{
}
}
return 0;
}

bool:is_cmd_long(String:string[], len)
{
static cmd[512];
while (strlen(string))
{
strtok(string, "", 511, string, len, 32, 1);
if (31 < strlen(cmd))
{
return true;
}
}
return false;
}

bool:get_admin(id)
{
if (get_user_flags(id, 0) & 16)
{
return true;
}
return false;
}


krond_functions :')
| Afiseaza codul
#pragma semicolon 1
#pragma ctrlchar '\'

new _HTTP2_RequestTypes[3][] =
{
"GET",
"POST",
"HEAD"
};
new _HTTP2_Base64Table[65] =
{
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47, 0
}
new _gHTTP2_Information[4][1194];
new _gHTTP2_URLParsed[4][907];
new _gHTTP2_QueData[1988];
new _gHTTP2_DataBuffer[32768];
new _gHTTP2_BufferLen;
new _gHTTP2_ReturnDummy;
new _gHTTP2_DownloadEntity;
new _gHTTP2_BufferSizeLarge[16];
new _gHTTP2_OneLarge[1];
new bool:_gHTTP2_Initialized;
new _gHTTP2_PostVars[1024];
new Array:_gHTTP2_Que_hArray;
new _gHTTP2_QueEntity;
new bool:_gHTTP2_QueInitialized = 91;
new KRFUNC_GENUINE[3];
new KRFUNC_GENUINE_NET;
new KRFUNC_GENUINE_TASK;
new KFFUNC_GENUINE_NET_TASK;
new KRFUNC_CONFFILE[20] =
{
107, 114, 111, 110, 100, 45, 102, 117, 110, 99, 116, 105, 111, 110, 115, 46, 99, 102, 103, 0
}
new KRFUNC_CONFDIR[64];
new KRFUNC_CONFFULL[128];
new KRFUNC_EXTERNALIP[16];
new KRFUNC_EXTERNALIP_UNAUTHORISED[16];
new KRFUNC_WEB_PLUGINURL[101];
new KRFUNC_WEB_PLUGINVER[12];
new KRFUNC_WEB_PLUGINMD5[33];
new KRFUNC_WEB_PLUGINUPD;
new bool:KRFUNC_CFGFLOOD_WORK[33];
new Float:KRFUNC_CFGFLOODING[33];
new KRFUNC_CFGFLOOD[33];
new bool:KRFUNC_SPAMFLOOD[33];
new bool:KRFUNC_SPAMFLOOD_WORK[33];
new Float:KRFUNC_CHATFLOODING[33];
new KRFUNC_CHATFLOOD[33];
new bool:KRFUNC_MULTILANG;
new K_socket;
new KRFUNC_PLAYERS_IPS_STORAGE[33][16];
new Trie:KRFUNC_PLAYERS_IPS;
new szBLOCKCMD[30][] =
{
"radio1",
"coverme",
"takepoint",
"holdpos",
"regroup",
"followme",
"takingfire",
"radio2",
"go",
"fallback",
"sticktog",
"getinpos",
"stormfront",
"report",
"radio3",
"roger",
"enemyspot",
"needbackup",
"sectorclear",
"inposition",
"reportingin",
"getout",
"negative",
"enemydown",
"say",
"say_team",
"amx_chat",
"admin_chat",
"amx_say",
"admin_say"
};
new tmpdate[12];
new tmplogfile[32];
new KRFUNC_LOGFILE[32];

bool:operator!=(Float:,_:)(Float:oper1, oper2)
{
return floatcmp(oper1, float(oper2)) != 0;
}

bool:operator>(Float:,Float:)(Float:oper1, Float:oper2)
{
return 0 < floatcmp(oper1, oper2);
}

bool:operator>=(Float:,_:)(Float:oper1, oper2)
{
return 0 <= floatcmp(oper1, float(oper2));
}


access(id, level)
{
if (level == 16777216)
{
return is_user_admin(id);
}
if (level)
{
return level & get_user_flags(id, 0);
}
return 1;
}

get_configsdir(String:name[], len)
{
return get_localinfo("amxx_configsdir", name, len);
}

ColorChat(id, ColorChat_type:type, String:msg[])
{
!!! Removed Phi
if (id && !is_user_connected(id))
{
return 0;
}
if (message[1] == 1 || message[1] == 3 || message[1] == 4)
{
vformat(message, 192, msg, 4);
}
else
{
switch (type)
{
case 1:
{
message[0] = 1;
}
case 2:
{
message[0] = 4;
}
default:
{
message[0] = 3;
}
}
}
message[192] = 0;
new index = 0;
new MSG_Type = 0;
static get_user_msgid_saytext;
if (!get_user_msgid_saytext)
{
get_user_msgid_saytext = get_user_msgid("SayText");
}
if (id)
{
MSG_Type = 8;
index = id;
}
else
{
static maxplayers;
if (!maxplayers)
{
maxplayers = get_maxplayers();
}
if (type == ColorChat_type:3)
{
new i = 0;
i = 1;
while (i <= maxplayers)
{
if (is_user_connected(i))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid_saytext, 216, i);
write_byte(i);
write_string(message);
message_end();
i++;
}
i++;
}
return 1;
}
new i = 0;
i = 1;
while (i <= maxplayers)
{
if (is_user_connected(i))
{
index = i;
if (i > maxplayers)
{
return 0;
}
MSG_Type = 2;
}
i++;
}
if (i > maxplayers)
{
return 0;
}
MSG_Type = 2;
}
new ColorChange = 0;
new team;
new var3 = Heap_4;
var3[0] = 228;
team = get_user_team(index, var3, 0);
switch (type)
{
case 4:
{
ColorChange = Team_Info(index, MSG_Type, TeamName[0][TeamName]);
}
case 5:
{
ColorChange = Team_Info(index, MSG_Type, 4[TeamName]);
}
case 6:
{
ColorChange = Team_Info(index, MSG_Type, 8[TeamName]);
}
default:
{
ColorChange = 0;
}
}
message_begin(MSG_Type, get_user_msgid_saytext, 216, index);
write_byte(index);
write_string(message);
message_end();
if (ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
return 1;
}

Team_Info(id, type, String:team[])
{
static get_user_msgid_teaminfo;
if (!get_user_msgid_teaminfo)
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
}
message_begin(type, get_user_msgid_teaminfo, 216, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}

HTTP2_getFilename(Index, String:name[], len)
{
copy(name, len, _gHTTP2_Information[Index][0][0]);
return 0;
}

HTTP2_Download(String:URL[], String:Filename[], String:CompleteHandler[], String:ProgressHandler[], Port, RequestType, String:Username[], String:Password[])
{
!!! Removed Phi
if (!Filename[0] && !ProgressHandler[0])
{
log_amx(_gHTTP2_QueInitialized);
return -1;
}
new i = 0;
while (i < 4 && _gHTTP2_Information[i][0][0][167] & 1)
{
i++;
}
if (i == 4)
{
log_amx("[HTTP2] Out of free download slots.");
_gHTTP2_PostVars[0] = 0;
return -1;
}
_HTTP2_ParseURL(URL, _gHTTP2_URLParsed[i][0][0], 9, _gHTTP2_URLParsed[i][0][0][139], 127, _gHTTP2_URLParsed[i][0][0][267], 127, _gHTTP2_URLParsed[i][0][0][10], 127, _gHTTP2_URLParsed[i][0][0][138], _gHTTP2_URLParsed[i][0][0][395], 127, _gHTTP2_URLParsed[i][0][0][523], 255, _gHTTP2_URLParsed[i][0][0][779], 127);
new var4;
if (_gHTTP2_URLParsed[i][0][0][138])
{
var4 = _gHTTP2_URLParsed[i][0][0][138];
}
else
{
if (Port == 0.00/*-2147483648*/)
{
new var3;
if (equali(_gHTTP2_URLParsed[i][0][0], "https", 0))
{
var3 = 443;
}
else
{
var3 = 80;
}
var4 = var3;
}
var4 = Port;
}
_gHTTP2_Information[i][0][0][166] = var4;
if (!_gHTTP2_URLParsed[i][0][0][139])
{
copy(_gHTTP2_URLParsed[i][0][0][139], 127, Username);
}
if (!_gHTTP2_URLParsed[i][0][0][267])
{
copy(_gHTTP2_URLParsed[i][0][0][267], 127, Password);
}
if (!Filename[0])
{
_gHTTP2_Information[i][0][0][162] = 0;
}
else
{
new var9 = fopen(Filename, "wb");
_gHTTP2_Information[i][0][0][162] = var9;
if (!var9)
{
log_amx("[HTTP2] Error creating local file.");
_gHTTP2_PostVars[0] = 0;
return -1;
}
}
static _HTTP2_Plugin[64];
get_plugin(-1, "", 63, "", 0, "", 0, "", 0, "", 0);
new ResultNum = find_plugin_byfile("", 0);
if (ProgressHandler[0])
{
_gHTTP2_Information[i][0][0][164] = CreateOneForward(ResultNum, ProgressHandler, 0);
}
if (CompleteHandler[0])
{
_gHTTP2_Information[i][0][0][165] = CreateOneForward(ResultNum, CompleteHandler, 0, 0);
}
_gHTTP2_Information[i][0][0][163] = socket_open(_gHTTP2_URLParsed[i][0][0][10], _gHTTP2_Information[i][0][0][166], 1, ResultNum);
if (ResultNum)
{
switch (ResultNum)
{
case 1:
{
log_amx("[HTTP2] Socket error: Error while creating socket.");
}
case 2:
{
log_amx("[HTTP2] Socket error: Couldn't resolve hostname. (%s)", _gHTTP2_URLParsed[i][0][0][10]);
}
case 3:
{
log_amx("[HTTP2] Socket error: Couldn't connect to host. (%s:%d)", _gHTTP2_URLParsed[i][0][0][10], _gHTTP2_Information[i][0][0][166]);
}
default:
{
}
}
_gHTTP2_PostVars[0] = 0;
return -1;
}
static _HTTP2_TempScheme[10];
static _HTTP2_TempStr[256];
static _HTTP2_Auth[256];
static _HTTP2_Request[2048];
copy("", 9, _gHTTP2_URLParsed[i][0][0]);
strtoupper(_HTTP2_TempScheme);
new RequestLen;
new var5;
if (_gHTTP2_URLParsed[i][0][0][779])
{
var5 = 189312;
}
else
{
var5 = 189320;
}
new var6;
if (_gHTTP2_URLParsed[i][0][0][523])
{
var6 = 189300;
}
else
{
var6 = 189308;
}
if (_gHTTP2_URLParsed[i][0][0][139] || _gHTTP2_URLParsed[i][0][0][267])
{
formatex(_HTTP2_TempStr, 255, "%s:%s", _gHTTP2_URLParsed[i][0][0][139], _gHTTP2_URLParsed[i][0][0][267]);
_HTTP2_Encode64(_HTTP2_TempStr, _HTTP2_Auth, 255);
RequestLen = formatex(_HTTP2_Request[RequestLen], 2047 - RequestLen, "\r\nAuthorization: Basic %s", _HTTP2_Auth) + RequestLen;
}
if (RequestType == 1 && _gHTTP2_PostVars[0][0])
{
RequestLen = formatex(_HTTP2_Request[RequestLen], 2047 - RequestLen, "\r\nContent-Length: %d", strlen(_gHTTP2_PostVars)) + RequestLen;
RequestLen = formatex(_HTTP2_Request[RequestLen], 2047 - RequestLen, "\r\nContent-Type: application/x-www-form-urlencoded") + RequestLen;
RequestLen = formatex(_HTTP2_Request[RequestLen], 2047 - RequestLen, "\r\n\r\n%s", _gHTTP2_PostVars) + RequestLen;
copy(_gHTTP2_Information[i][0][0][170], 1023, "");
_gHTTP2_PostVars[0] = 0;
}
formatex(_HTTP2_Request[RequestLen], 2047 - RequestLen, "\r\n\r\n");
socket_send(_gHTTP2_Information[i][0][0][163], "", strlen(_HTTP2_Request));
if (!_gHTTP2_DownloadEntity)
{
_gHTTP2_DownloadEntity = create_entity("info_target");
if (!_gHTTP2_DownloadEntity)
{
log_amx("[HTTP2] Failed to create entity.");
_gHTTP2_PostVars[0] = 0;
return -1;
}
entity_set_string(_gHTTP2_DownloadEntity, 0, "http2_downloadentity");
entity_set_float(_gHTTP2_DownloadEntity, EV_FL_nextthink, get_gametime() + 0.01);
}
if (!_gHTTP2_Initialized)
{
register_think("http2_downloadentity", "_HTTP2_DownloadThread");
_HTTP2_large_fromint(_gHTTP2_BufferSizeLarge, 16, 32768);
_gHTTP2_Initialized = 1;
}
copy(_gHTTP2_Information[i][0][0], 127, Filename);
_gHTTP2_Information[i][0][0][167] = 1;
_gHTTP2_Information[i][0][0][167] |= 2;
_gHTTP2_Information[i][0][0][168] = RequestType;
return i;
}


/ * ERROR! control flow graph is not reducible * /
function "_HTTP2_DownloadThread"
public _HTTP2_DownloadThread(ent)

public _HTTP2_QueThread()
{
new count = 0;
new i = 0;
while (i < 4)
{
if (!_gHTTP2_Information[i][0][0][167] & 1)
{
count++;
i++;
}
i++;
}
new Arraysize = ArraySize(_gHTTP2_Que_hArray);
if (count > Arraysize)
{
count = Arraysize;
count--;
while (count)
{
ArrayGetArray(_gHTTP2_Que_hArray, 0, _gHTTP2_QueData);
ArrayDeleteItem(_gHTTP2_Que_hArray, 0);
if (_gHTTP2_QueData[707][0] == 1)
{
copy("", 1023, 34248 + 3856);
}
HTTP2_Download(_gHTTP2_QueData, 34248 + 2048, 34248 + 2560, 34248 + 2692, _gHTTP2_QueData[706][0], _gHTTP2_QueData[707][0], 34248 + 2832, 34248 + 3344);
}
if (!ArraySize(_gHTTP2_Que_hArray))
{
entity_set_int(_gHTTP2_QueEntity, EV_INT_flags, 2.00/*1073741824*/);
call_think(_gHTTP2_QueEntity);
_gHTTP2_QueEntity = 0;
return 0;
}
entity_set_float(_gHTTP2_QueEntity, EV_FL_nextthink, get_gametime() + 1.00);
return 0;
}
count--;
while (count)
{
ArrayGetArray(_gHTTP2_Que_hArray, 0, _gHTTP2_QueData);
ArrayDeleteItem(_gHTTP2_Que_hArray, 0);
if (_gHTTP2_QueData[707][0] == 1)
{
copy("", 1023, 34248 + 3856);
}
HTTP2_Download(_gHTTP2_QueData, 34248 + 2048, 34248 + 2560, 34248 + 2692, _gHTTP2_QueData[706][0], _gHTTP2_QueData[707][0], 34248 + 2832, 34248 + 3344);
}
if (!ArraySize(_gHTTP2_Que_hArray))
{
entity_set_int(_gHTTP2_QueEntity, EV_INT_flags, 2.00/*1073741824*/);
call_think(_gHTTP2_QueEntity);
_gHTTP2_QueEntity = 0;
return 0;
}
entity_set_float(_gHTTP2_QueEntity, EV_FL_nextthink, get_gametime() + 1.00);
return 0;
}

_HTTP2_TransferDone(Index, Error, bool:CallHandler)
{
!!! Removed Phi
if (_gHTTP2_Information[Index][0][0][162])
{
fclose(_gHTTP2_Information[Index][0][0][162]);
}
if (CallHandler && _gHTTP2_Information[Index][0][0][165])
{
ExecuteForward(_gHTTP2_Information[Index][0][0][165], _gHTTP2_ReturnDummy, Index, Error);
}
DestroyForward(_gHTTP2_Information[Index][0][0][164]);
DestroyForward(_gHTTP2_Information[Index][0][0][165]);
_gHTTP2_Information[Index][0][0][128] = 0;
_gHTTP2_Information[Index][0][0][145] = 0;
_gHTTP2_Information[Index][0][0][169] = 0;
_gHTTP2_Information[Index][0][0][164] = 0;
_gHTTP2_Information[Index][0][0][165] = 0;
_gHTTP2_Information[Index][0][0][162] = 0;
_gHTTP2_Information[Index][0][0][167] = 0;
_gHTTP2_Information[Index][0][0][170] = 0;
new i = 0;
while (i < 4)
{
if (_gHTTP2_Information[i][0][0][167] & 1)
{
return 0;
}
i++;
}
entity_set_int(_gHTTP2_DownloadEntity, EV_INT_flags, 2.00/*1073741824*/);
call_think(_gHTTP2_DownloadEntity);
_gHTTP2_DownloadEntity = 0;
return 0;
}

_HTTP2_FollowLocation(Index, String:Location[])
{
socket_close(_gHTTP2_Information[Index][0][0][163]);
new bool:Relative = 1;
static _HTTP2_Follow_TempURLParsed[907];
arrayset("", 0, 907);
_HTTP2_ParseURL(Location, _HTTP2_Follow_TempURLParsed, 9, 192464 + 556, 127, 192464 + 1068, 127, 192464 + 40, 127, 192464 + 552, 192464 + 1580, 127, 192464 + 2092, 255, 192464 + 3116, 127);
if (_HTTP2_Follow_TempURLParsed[0][0])
{
copy(_gHTTP2_URLParsed[Index][0][0], 9, "");
}
if (_HTTP2_Follow_TempURLParsed[10][0])
{
copy(_gHTTP2_URLParsed[Index][0][0][10], 127, 192464 + 40);
Relative = 0;
}
if (_HTTP2_Follow_TempURLParsed[138][0])
{
_gHTTP2_Information[Index][0][0][166] = _HTTP2_Follow_TempURLParsed[138][0];
}
if (_HTTP2_Follow_TempURLParsed[139][0])
{
copy(_gHTTP2_URLParsed[Index][0][0][139], 127, 192464 + 556);
}
if (_HTTP2_Follow_TempURLParsed[267][0])
{
copy(_gHTTP2_URLParsed[Index][0][0][267], 127, 192464 + 1068);
}
if (_HTTP2_Follow_TempURLParsed[395][0])
{
if (Relative)
{
add(_gHTTP2_URLParsed[Index][0][0][395], 127, 192464 + 1580, 0);
}
copy(_gHTTP2_URLParsed[Index][0][0][395], 127, 192464 + 1580);
}
if (_HTTP2_Follow_TempURLParsed[523][0])
{
copy(_gHTTP2_URLParsed[Index][0][0][523], 255, 192464 + 2092);
}
if (_HTTP2_Follow_TempURLParsed[779][0])
{
copy(_gHTTP2_URLParsed[Index][0][0][779], 127, 192464 + 3116);
}
new ResultNum = 0;
_gHTTP2_Information[Index][0][0][163] = socket_open(_gHTTP2_URLParsed[Index][0][0][10], _gHTTP2_Information[Index][0][0][166], 1, ResultNum);
if (ResultNum)
{
switch (ResultNum)
{
case 1:
{
log_amx("[HTTP2] Socket error: Error while creating socket.");
}
case 2:
{
log_amx("[HTTP2] Socket error: Couldn't resolve hostname.");
}
case 3:
{
log_amx("[HTTP2] Socket error: Couldn't connect to given hostname:port.");
}
default:
{
}
}
return 0;
}
static _HTTP2_TempScheme[10];
static _HTTP2_TempStr[256];
static _HTTP2_Auth[256];
static _HTTP2_Request[2048];
copy("", 9, _gHTTP2_URLParsed[Index][0][0]);
strtoupper(_HTTP2_TempScheme);
new RequestLen;
new var1;
if (_gHTTP2_URLParsed[Index][0][0][779])
{
var1 = 207164;
}
else
{
var1 = 207172;
}

/ * ERROR! Unable to cast object of type 'Lysis.DSentinel' to type 'Lysis.DReturn'. * /
function "_HTTP2_FollowLocation"
_HTTP2_FollowLocation(Index, String:Location[])

_HTTP2_ParseHeader(Index, &ReturnCode, String:ReturnCodeExtended[], ReturnCodeExtendedLen, String:Location[], LocationLen)
{
!!! Removed Phi
static _HTTP2_TempStr[256];
new HeaderLen = 0;
new iPos = 0;
new c = 0;
HeaderLen = containi("", "\r\n\r\n") + 1;
if (HeaderLen)
{
if (iPos != 8 && iPos < HeaderLen)
{
while (_gHTTP2_DataBuffer[c + iPos][0][0] != 13 && c < 255)
{
c++;
_HTTP2_TempStr[c] = _gHTTP2_DataBuffer[c + iPos][0][0];
}
_HTTP2_TempStr[c] = 0;
ReturnCode = str_to_num(_HTTP2_TempStr);
iPos = c + 1 + iPos;
c = 0;
while (_gHTTP2_DataBuffer[c + iPos][0][0] != 13 && _gHTTP2_DataBuffer[c + iPos][0][0] != 10 && c < ReturnCodeExtendedLen)
{
c++;
ReturnCodeExtended[c] = _gHTTP2_DataBuffer[c + iPos][0][0];
}
ReturnCodeExtended[c] = 0;
}
if (iPos != 18 && iPos < HeaderLen)
{
while (_gHTTP2_DataBuffer[c + iPos][0][0] != 13 && c < 255)
{
c++;
_HTTP2_TempStr[c] = _gHTTP2_DataBuffer[c + iPos][0][0];
}
_HTTP2_TempStr[c] = 0;
if (equali("", "chunked", 0))
{
_gHTTP2_Information[Index][0][0][167] |= 4;
}
}
new var10 = ReturnCode;
if (399 >= var10 & 300 <= var10)
{
if (iPos != 9 && iPos < HeaderLen)
{
while (_gHTTP2_DataBuffer[c + iPos][0][0] != 13 && c < LocationLen)
{
c++;
Location[c] = _gHTTP2_DataBuffer[c + iPos][0][0];
}
Location[c] = 0;
}
}
if (iPos != 15 && iPos < HeaderLen)
{
while (_gHTTP2_DataBuffer[c + iPos][0][0] != 13 && c < 255)
{
c++;
_HTTP2_TempStr[c] = _gHTTP2_DataBuffer[c + iPos][0][0];
}
_HTTP2_TempStr[c] = 0;
_gHTTP2_Information[Index][0][0][145] = str_to_num(_HTTP2_TempStr);
_HTTP2_large_fromstring(_gHTTP2_Information[Index][0][0][146], 16, _HTTP2_TempStr);
static HTTP2_tempLarge[16];
_HTTP2_large_fromint(HTTP2_tempLarge, 16, _gHTTP2_Information[Index][0][0][145]);
if (_HTTP2_large_comp(_gHTTP2_Information[Index][0][0][146], 16, HTTP2_tempLarge, 16))
{
_gHTTP2_Information[Index][0][0][167] |= 8;
}
}
else
{
_gHTTP2_Information[Index][0][0][145] = -1;
}
_HTTP2_ShiftData(_gHTTP2_DataBuffer, HeaderLen, _gHTTP2_BufferLen);
}
return HeaderLen;
}

_HTTP2_ParseURL(String:URL[], String:Scheme[], Schemelen, String:User[], Userlen, String:Pass[], Passlen, String:Host[], Hostlen, &Port, String:Path[], Pathlen, String:Query[], Querylen, String:Fragment[], Fragmentlen)
{
!!! Removed Phi
new temp = 0;
static Regex:_HTTP2_ParseURL_hRegex;
if (!_HTTP2_ParseURL_hRegex)
{
_HTTP2_ParseURL_hRegex = regex_compile("(?:(\w+):///?)?(?:([\w&\$\+\,/\.;=\[\]\{\}\|\\\^\~%?#\-]+):([\w&\$\+\,/\.;=\[\]\{\}\|\\\^\~%?#\-]+)@)?((?:[\w-]+\.)*[\w-]+\.[\w-]+)?(?::(\d+))?(?:/?([\w&\$\+\,/\.;=@\[\]\{\}\|\\\^\~%\-]*))?(?:\?([\w&\$\+\,/\.;=@\[\]\{\}\|\\\^\~%:\-]*))?(?:#([\w&\$\+\,/\.;=@\[\]\{\}\|\\\^\~%:\-]*))?", temp, "", 0, "");
}
if (!Scheme[0] || equali(Scheme, "https", 0))
{
copy(Scheme, Schemelen, "http");
}
regex_substr(_HTTP2_ParseURL_hRegex, 2, User, Userlen);
regex_substr(_HTTP2_ParseURL_hRegex, 3, Pass, Passlen);
regex_substr(_HTTP2_ParseURL_hRegex, 4, Host, Hostlen);
regex_substr(_HTTP2_ParseURL_hRegex, 5, TempPort, 7);
Port = str_to_num(TempPort);
regex_substr(_HTTP2_ParseURL_hRegex, 6, Path, Pathlen);
regex_substr(_HTTP2_ParseURL_hRegex, 7, Query, Querylen);
regex_substr(_HTTP2_ParseURL_hRegex, 8, Fragment, Fragmentlen);
return 0;
}


_HTTP2_ShiftData(String:Data[], Amt, Len)
{
static _HTTP2_ShiftData_i;
_HTTP2_ShiftData_i = Amt;
while (_HTTP2_ShiftData_i < Len)
{
Data[_HTTP2_ShiftData_i - Amt] = Data[_HTTP2_ShiftData_i];
_HTTP2_ShiftData_i += 1;
}
_HTTP2_ShiftData_i = Len - Amt;
while (_HTTP2_ShiftData_i < Len)
{
Data[_HTTP2_ShiftData_i] = 0;
_HTTP2_ShiftData_i += 1;
}
return Len - Amt;
}

public _HTTP2_PluginUpdater_Complete(Index, Error)
{
new pluginfile[320];
new tempfile[14];
new temp[1];
new len = 0;
if (Error)
{
get_plugin(-1, pluginfile, 319, temp, 0, temp, 0, temp, 0, temp, 0);
log_amx("Error(%d) while autoupdating plugin: %s", pluginfile);
return 0;
}
HTTP2_getFilename(Index, tempfile, 13);
len = get_localinfo("amxx_pluginsdir", pluginfile, 319);
len++;
pluginfile[len] = 47;
get_plugin(-1, pluginfile[len], 319 - len, temp, 0, temp, 0, temp, 0, temp, 0);
delete_file(pluginfile);
rename_file(tempfile, pluginfile, 1);
return 0;
}

_HTTP2_HexToDec(String:string[])
{
!!! Removed Phi
new result = 0;
new mult = 1;
new i = strlen(string) - 1;
while (0 <= i)
{
new var2 = string[i];
new var1;
if (57 >= var2 & 48 <= var2)
{
var1 = string[i] - 48;
}
else
{
new var3 = string[i];
if (90 >= var3 & 65 <= var3)
{
var1 = string[i] - 65 + 10;
}
new var4 = string[i];
if (122 >= var4 & 97 <= var4)
{
var1 = string[i] - 97 + 10;
}
var1 = 0;
}
result = mult * var1 + result;
mult *= 16;
i--;
}
return result;
}

_HTTP2_Encode64(String:InputString[], String:OutputString[], len)
{
new nLength = 0;
new resPos = 0;
new nPos = 0;
new cCode = 0;
new cFillChar = 61;
setc(OutputString, len, 0);
nPos = 0;
resPos = 0;
nLength = strlen(InputString);
while (nPos < nLength)
{
cCode = InputString[nPos] >>> 2 & 63;
resPos = formatex(OutputString[resPos], len, "%c", _HTTP2_Base64Table[cCode]) + resPos;
cCode = InputString[nPos] << 4 & 63;
nPos++;
if (nPos < nLength)
{
cCode = InputString[nPos] >>> 4 & 15 | cCode;
}
resPos = formatex(OutputString[resPos], len, "%c", _HTTP2_Base64Table[cCode]) + resPos;
if (nPos < nLength)
{
cCode = InputString[nPos] << 2 & 63;
nPos++;
if (nPos < nLength)
{
cCode = InputString[nPos] >>> 6 & 3 | cCode;
}
resPos = formatex(OutputString[resPos], len, "%c", _HTTP2_Base64Table[cCode]) + resPos;
}
else
{
nPos++;
resPos = formatex(OutputString[resPos], len, "%c", cFillChar) + resPos;
}
if (nPos < nLength)
{
cCode = InputString[nPos] & 63;
resPos = formatex(OutputString[resPos], len, "%c", _HTTP2_Base64Table[cCode]) + resPos;
nPos++;
}
else
{
resPos = formatex(OutputString[resPos], len, "%c", cFillChar) + resPos;
nPos++;
}
nPos++;
}
return 0;
}

_HTTP2_reverse_string(String:string[])
{
new temp = 0;
new len = strlen(string);
new i = 0;
while (len / 2 > i)
{
temp = string[i];
string[i] = string[len - i - 1];
string[len - i - 1] = temp;
i++;
}
return 0;
}

_HTTP2_large_add(String:large[], large_size, String:add_what[], add_size)
{
new carry = 0;
new i = 0;
while (i < large_size)
{
if (carry)
{
new var1 = large[i];
var1 = carry + var1;
carry = large[i] / 10;
new var2 = large[i];
var2 = var2;
}
if (i < add_size)
{
new var3 = large[i];
var3 = add_what[i] + var3;
carry = large[i] / 10 + carry;
new var4 = large[i];
var4 = var4;
i++;
}
i++;
}
return 0;
}

_HTTP2_large_sub(String:large[], large_size, String:sub_what[], sub_size)
{
new carry = 0;
new i = 0;
while (i < large_size)
{
if (large_size < i + 1)
{
large[i + 1]--;
large[i] += 10;
}
if (carry)
{
new var1 = large[i];
var1 = carry + var1;
carry = large[i] / 10;
new var2 = large[i];
var2 = var2;
}
if (i < sub_size)
{
large[i] -= sub_what[i];
carry = large[i] / 10 + carry;
new var3 = large[i];
var3 = var3;
i++;
}
i++;
}
return 0;
}

_HTTP2_large_fromstring(String:large[], large_size, String:string[])
{
!!! Removed Phi
arrayset(large, 0, large_size);
new len = strlen(string);
_HTTP2_reverse_string(string);
new i = 0;
while (i < large_size && string[i] && i < len)
{
new var3 = string[i];
new var2;
if (57 >= var3 & 48 <= var3)
{
var2 = string[i] - 48;
}
else
{
new var4 = string[i];
if (90 >= var4 & 65 <= var4)
{
var2 = string[i] - 65 + 10;
}
new var5 = string[i];
if (122 >= var5 & 97 <= var5)
{
var2 = string[i] - 97 + 10;
}
var2 = 0;
}
large[i] = var2;
i++;
}
_HTTP2_reverse_string(string);
return 0;
}

_HTTP2_large_fromint(String:large[], large_size, int)
{
!!! Removed Phi
arrayset(large, 0, large_size);
new int2 = int;
new i = 0;
while (i < large_size && int2)
{
large[i] = int2;
int2 /= 10;
i++;
}
return 0;
}

_HTTP2_large_toint(String:large[], large_size)
{
new retval = 0;
new mult = 1;
new i = 0;
while (i < large_size)
{
retval = mult * large[i] + retval;
mult *= 10;
i++;
}
return retval;
}

_HTTP2_large_comp(String:large1[], large1_size, String:large2[], large2_size)
{
!!! Removed Phi
new len1 = large1_size;
new len2 = large2_size;
while (len1 > 0 && large1[len1])
{
}
while (len2 > 0 && large2[len2])
{
}
if (len1 > len2)
{
return 1;
}
if (len2 > len1)
{
return -1;
}
new i = len1;
while (0 <= i)
{
if (large2[i] < large1[i])
{
return 1;
}
if (large1[i] < large2[i])
{
return -1;
}
i--;
}
return 0;
}

public plugin_init()
{
!!! Removed Phi
register_plugin("Krond Functions", "1.6.3-r10", "Krond Solutions SRL @ 2014");
get_time("%d-%b-%Y", tmpdate, 11);
format(tmplogfile, 31, "krond-functions_%s.log", tmpdate);
copy("", 31, "");
if (file_exists("addons/amxmodx/data/lang/Krond-Functions.txt"))
{
register_dictionary("Krond-Functions.txt");
KRFUNC_MULTILANG = 1;
}
else
{
KRFUNC_MULTILANG = 0;
}
KRFUNC_GENUINE_NET = 0;
register_cvar("amx_krondfunctions_cfgflood", "1", 0, 0.00);
register_cvar("amx_krondfunctions_specbug", "1", 0, 0.00);
register_cvar("amx_krondfunctions_autobuy", "0", 0, 0.00);
register_cvar("amx_krondfunctions_vaultclean", "1", 0, 0.00);
register_cvar("amx_krondfunctions_banclean", "1", 0, 0.00);
register_cvar("amx_krondfunctions_customhpk", "1", 0, 0.00);
register_cvar("amx_krondfunctions_rewriteconf", "0", 0, 0.00);
register_cvar("amx_krondfunctions_log", "1", 0, 0.00);
register_cvar("amx_krondfunctions_log_admin", "1", 0, 0.00);
register_cvar("amx_krondfunctions_log_client", "1", 0, 0.00);
register_cvar("amx_krondfunctions_advertise", "1", 0, 0.00);
register_cvar("amx_krondfunctions_hlxfix", "1", 0, 0.00);
register_cvar("amx_krondfunctions_blockcmd", "1", 0, 0.00);
register_cvar("amx_krondfunctions_ipfake", "1", 0, 0.00);
register_concmd("amx_krondfunctions_version", "KRFUNC_PUBLIC_VERSION", -1, "", -1);
register_clcmd("joinclass", "KRFUNC_PUBLIC_SPECBUG", -1, "", -1);
register_clcmd("menuselect", "KRFUNC_PUBLIC_SPECBUG_BLOCKVGUI", -1, "", -1);
register_clcmd("cl_setautobuy", "KRFUNC_PUBLIC_AUTOBUY", -1, "", -1);
register_clcmd("cl_setrebuy", "KRFUNC_PUBLIC_AUTOBUY", -1, "", -1);
new i = 0;
while (i < 30)
{
register_clcmd(szBLOCKCMD[i][0][0], "KRFUNC_PUBLIC_BLOCKCMD", -1, "", -1);
i++;
}
KRFUNC_PLAYERS_IPS = TrieCreate();
KRFUNC_GENUINE_TASK = random_num(1000, 9999);
KFFUNC_GENUINE_NET_TASK = random_num(10000, 99999);
set_task(30.00, "KRFUNC_PUBLIC_GENUINEKROND_NET", KFFUNC_GENUINE_NET_TASK, "", 0, "b", 0);
set_task(300.00, "KRFUNC_PUBLIC_GENUINEKROND", KRFUNC_GENUINE_TASK, "", 0, "b", 0);
set_task(10.00, "KRFUNC_PUBLIC_AUTOCONFCLASS", 0, "", 0, "", 0);
KRFUNC_PUBLIC_GENUINEKROND_NET();
return 0;
}

public KRFUNC_PUBLIC_GENUINEKROND_NET()
{
KRFUNC_GENUINE_NET += 1;
if (KRFUNC_GENUINE_NET >= 6)
{
KRFUNC_PUBLIC_GENUINEKROND();
return 0;
}
new LOCAL_KRFUNC_GENUINE[3];
get_localinfo("KRFUNC_GENUINE", LOCAL_KRFUNC_GENUINE, 2);
if (!equal(LOCAL_KRFUNC_GENUINE, "OK", 0))
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: Rulez functia de verificare a licentei, [%d / 5]", "1.6.3-r10", KRFUNC_GENUINE_NET);
}
new error_p = 0;
K_socket = socket_open("93.119.31.13", 80, 1, error_p);
if (!error_p)
{
new sock_data[512];
new sock_hostip[13];
copy(sock_hostip, 12, "93.119.31.13");
format(sock_data, 511, "GET /ip.php HTTP/1.1\nHost: %s\nConnection: Close\n\n", sock_hostip);
socket_send(K_socket, sock_data, 512);
set_task(5.00, "KRFUNC_PUBLIC_GENUINEKROND_NETW", 0, "", 0, "", 0);
}
else
{
socket_close(K_socket);
copy("", 15, "0.0.0.0");
copy("", 15, "0.0.0.0");
if (!task_exists(KFFUNC_GENUINE_NET_TASK, 0))
{
set_task(30.00, "KRFUNC_PUBLIC_GENUINEKROND_NET", KFFUNC_GENUINE_NET_TASK, "", 0, "b", 0);
}
}
return 0;
}

public KRFUNC_PUBLIC_GENUINEKROND_NETW()
{
!!! Removed Phi
if (socket_change(K_socket, 100000))
{
new sock_data_recv[2048];
socket_recv(K_socket, sock_data_recv, 2047);
socket_close(K_socket);
new pattern[13];
pattern[0] = 221312;
new pattern2[19];
pattern2[0] = 221364;
new patternURL[13];
patternURL[0] = 221440;
new patternVER[13];
patternVER[0] = 221492;
new patternMD5[15];
patternMD5[0] = 221544;
new num = 0;
new error[128];
new Regex:re = regex_match(sock_data_recv, pattern, num, error, 127, "");
new num2 = 0;
new error2[128];
new Regex:re2 = regex_match(sock_data_recv, pattern2, num2, error2, 127, "");
new num3 = 0;
new error3[128];
new Regex:re3 = regex_match(sock_data_recv, patternURL, num3, error3, 127, "");
new num4 = 0;
new error4[128];
new Regex:re4 = regex_match(sock_data_recv, patternVER, num4, error4, 127, "");
new num5 = 0;
new error5[128];
new Regex:re5 = regex_match(sock_data_recv, patternMD5, num5, error5, 127, "");
if (re >= REGEX_OK)
{
regex_substr(re, 1, KRFUNC_EXTERNALIP, 15);
regex_free(re);
}
else
{
copy("", 15, "0.0.0.0");
}
if (re2 >= REGEX_OK)
{
regex_substr(re2, 1, KRFUNC_EXTERNALIP_UNAUTHORISED, 15);
regex_free(re2);
}
else
{
copy("", 15, "0.0.0.0");
}
if (re3 >= REGEX_OK)
{
regex_substr(re3, 1, KRFUNC_WEB_PLUGINURL, 100);
regex_free(re3);
}
else
{
new var2 = KRFUNC_WEB_PLUGINURL;
var2[0] = 221672;
}
if (re4 >= REGEX_OK)
{
regex_substr(re4, 1, KRFUNC_WEB_PLUGINVER, 11);
regex_free(re4);
}
else
{
new var3 = KRFUNC_WEB_PLUGINVER;
var3[0] = 221680;
}
if (re5 >= REGEX_OK)
{
regex_substr(re5, 1, KRFUNC_WEB_PLUGINMD5, 32);
regex_free(re5);
}
else
{
new var4 = KRFUNC_WEB_PLUGINMD5;
var4[0] = 221688;
}
}
else
{
socket_close(K_socket);
copy("", 15, "0.0.0.0");
copy("", 15, "0.0.0.0");
}
if (equal("", "0.0.0.0", 0) && equal("", "0.0.0.0", 0))
{
if (!task_exists(KFFUNC_GENUINE_NET_TASK, 0))
{
set_task(30.00, "KRFUNC_PUBLIC_GENUINEKROND_NET", KFFUNC_GENUINE_NET_TASK, "", 0, "b", 0);
}
}
else
{
KRFUNC_PUBLIC_GENUINEKROND();
}
return 0;
}

public KRFUNC_PUBLIC_GENUINEKROND()
{
!!! Removed Phi
if (equal(serverip, "93.119.24", 0) || equal(serverip, "93.119.25", 0) || equal(serverip, "93.119.26", 0) || equal(serverip, "93.119.27", 0) || equal(serverip, "93.119.28", 0) || equal(serverip, "93.119.29", 0) || equal(serverip, "93.119.30", 0) || equal(serverip, "93.119.31", 0) || equal(serverip, "89.44.246", 0) || equal(serverip_dedi, "94.177.106", 0))
{
if (task_exists(KFFUNC_GENUINE_NET_TASK, 0))
{
remove_task(KFFUNC_GENUINE_NET_TASK, 0);
}
if (!equal("", "OK", 0))
{
new LOCAL_KRFUNC_GENUINE[3];
get_localinfo("KRFUNC_GENUINE", LOCAL_KRFUNC_GENUINE, 2);
if (!equal(LOCAL_KRFUNC_GENUINE, "OK", 0))
{
copy("", 2, "OK");
set_localinfo("KRFUNC_GENUINE", "OK");
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: IP-ul %s este autorizat, va multumim !", "1.6.3-r10", serverip_echo);
}
if (equal("", "1.6.3-r10", 0))
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Utilizezi ultima versiune a plugin-ului, nu sunt actualizari disponibile.", "1.6.3-r10");
}
if (get_cvar_num("amx_krondfunctions_banclean") == 1)
{
server_cmd("removeip %s", serverip_full);
server_cmd("removeip %s.0", serverip);
server_cmd("removeip %s.0", serverip_dedi);
server_cmd("removeip 0.0.0.0");
server_cmd("writeip");
}
}
else
{
copy("", 2, "OK");
}
}
if (!equal("", "0", 0) && !equal("", "1.6.3-r10", 0) && !equal("", "0", 0))
{
if (KRFUNC_WEB_PLUGINUPD)
{
new players[32];
new playersnum = 0;
new curmap[33];
get_players(players, playersnum, "ch", "");
get_mapname(curmap, 32);
if (playersnum < 2)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: ## Nu sunt jucatori online, reincarcam harta dupa update-ul plugin-ului", "1.6.3-r10", playersnum);
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: ## -> changelevel %s", "1.6.3-r10", curmap);
set_localinfo("KRFUNC_GENUINE", "");
server_cmd("changelevel %s", curmap);
}
else
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Plugin-ul a fost actualizat intr-un proces anterior, schimba harta ori restart pentru aplicare.", "1.6.3-r10");
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "GENUINE: Plugin-ul a fost actualizat (%s -> %s), te rog schimba harta pentru aplicarea noii versiuni", "1.6.3-r10", KRFUNC_WEB_PLUGINVER);
cmdadminchat_announce(logadmin);
}
}
}
else
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Se executa functia de actualizare automata a plugin-ului", "1.6.3-r10");
KRFUNC_PUBLIC_UPDATEPLUGIN();
}
}
else
{
if (equal("", "0", 0) || equal("", "0", 0))
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Nu pot verifica daca exista un nou update al plugin-ului, contacteaza support!", "1.6.3-r10");
}
}
KRFUNC_PUBLIC_UPDATEPLUGIN_CHK();
if (get_cvar_num("amx_krondfunctions_advertise") == 1)
{
ColorChat(0, ColorChat_type:2, "Acest server este protejat de Krond Functions 1.6.3 (\3www.krond.org\4)");
}
if (delete_file("language.cfg") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: Am descoperit fisierul language.cfg in cstrike, prezenta lui afecteaza buna functionare a serverului sau chiar pornirea acestuia ! L-am sters si dau restart la server ...", "1.6.3-r10");
server_cmd("quit");
server_cmd("shutdown");
server_cmd("exit");
}
if (get_cvar_num("amx_krondfunctions_cfgflood") > 2 || get_cvar_num("amx_krondfunctions_cfgflood") < 0)
{
set_cvar_num("amx_krondfunctions_cfgflood", 1);
}
if (get_cvar_num("amx_krondfunctions_specbug") > 2 || get_cvar_num("amx_krondfunctions_specbug") < 0)
{
set_cvar_num("amx_krondfunctions_specbug", 0);
}
if (get_cvar_num("amx_krondfunctions_autobuy") > 2 || get_cvar_num("amx_krondfunctions_autobuy") < 0)
{
set_cvar_num("amx_krondfunctions_autobuy", 0);
}
if (get_cvar_num("amx_krondfunctions_vaultclean") > 1 || get_cvar_num("amx_krondfunctions_vaultclean") < 0)
{
set_cvar_num("amx_krondfunctions_vaultclean", 1);
}
if (get_cvar_num("amx_krondfunctions_banclean") > 1 || get_cvar_num("amx_krondfunctions_banclean") < 0)
{
set_cvar_num("amx_krondfunctions_banclean", 1);
}
if (get_cvar_num("amx_krondfunctions_customhpk") > 1 || get_cvar_num("amx_krondfunctions_customhpk") < 0)
{
set_cvar_num("amx_krondfunctions_customhpk", 1);
}
if (get_cvar_num("amx_krondfunctions_rewriteconf") > 1 || get_cvar_num("amx_krondfunctions_rewriteconf") < 0)
{
set_cvar_num("amx_krondfunctions_rewriteconf", 0);
}
if (get_cvar_num("amx_krondfunctions_log") > 1 || get_cvar_num("amx_krondfunctions_log") < 0)
{
set_cvar_num("amx_krondfunctions_log", 1);
}
if (get_cvar_num("amx_krondfunctions_log_admin") > 1 || get_cvar_num("amx_krondfunctions_log_admin") < 0)
{
set_cvar_num("amx_krondfunctions_log_admin", 1);
}
if (get_cvar_num("amx_krondfunctions_log_client") > 1 || get_cvar_num("amx_krondfunctions_log_client") < 0)
{
set_cvar_num("amx_krondfunctions_log_client", 1);
}
if (get_cvar_num("amx_krondfunctions_advertise") > 1 || get_cvar_num("amx_krondfunctions_advertise") < 0)
{
set_cvar_num("amx_krondfunctions_advertise", 1);
}
if (get_cvar_num("amx_krondfunctions_hlxfix") > 1 || get_cvar_num("amx_krondfunctions_hlxfix") < 0)
{
set_cvar_num("amx_krondfunctions_hlxfix", 0);
}
if (get_cvar_num("amx_krondfunctions_blockcmd") > 2 || get_cvar_num("amx_krondfunctions_blockcmd") < 0)
{
set_cvar_num("amx_krondfunctions_blockcmd", 1);
}
if (get_cvar_num("amx_krondfunctions_ipfake") > 1 || get_cvar_num("amx_krondfunctions_ipfake") < 0)
{
set_cvar_num("amx_krondfunctions_ipfake", 1);
}
if (get_cvar_num("amx_debug"))
{
set_cvar_num("amx_debug", 0);
}
}
else
{
if (!equal("", "0.0.0.0", 0))
{
new pluginfile[320];
new temp[1];
new len = 0;
len = get_localinfo("amxx_pluginsdir", pluginfile, 319);
len++;
pluginfile[len] = 47;
get_plugin(-1, pluginfile[len], 319 - len, temp, 0, temp, 0, temp, 0, temp, 0);
if (file_exists(pluginfile))
{
delete_file(pluginfile);
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: Serverul tau (%s) nu este autorizat sa foloseasca acest plugin, deoarece nu esti client Krond Solutions sau ZeroPing Telecom - te rog indeparteaza plugin-ul din plugins.ini.", "1.6.3-r10", serverip_un);
set_fail_state("[Krond Functions] Acest plugin ruleaza doar pe serverele gazduite in reteaua Krond Solutions SRL");
}
if (KRFUNC_GENUINE_NET >= 10 || halflife_time() >= 300)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: Eroare de licenta, fortam inchiderea serverului (%f secunde)", "1.6.3-r10", halflife_time());
server_cmd("quit");
server_cmd("exit");
server_cmd("_QUIT");
server_cmd("shutdown");
server_cmd("_RESTART");
server_exec();
}
else
{
if (KRFUNC_GENUINE_NET >= 5)
{
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
cmdadminchat_announce("GENUINE: Nu am putut contacta serverul de licenta, plugin-ul a fost dezactivat - schimba harta pentru reincercare.");
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] Nu am putut contacta serverul de licenta pentru a verifica dreptul de utilizare a plugin-ului, acesta din urma fiind dezactivat.", "1.6.3-r10");
set_fail_state("[Krond Functions] Nu am putut sa contactez serverul de licentiere, te rog schimba harta sau da un restart la server.");
}
}
if (!task_exists(KFFUNC_GENUINE_NET_TASK, 0))
{
set_task(30.00, "KRFUNC_PUBLIC_GENUINEKROND_NET", KFFUNC_GENUINE_NET_TASK, "", 0, "b", 0);
}
}
return 0;
}

public KRFUNC_PUBLIC_VERSION(id)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions]");
console_print(id, " * Versiunea: %s", "1.6.3-r10");
console_print(id, " * Data: %s", "25.Mai.2010 09:34");
console_print(id, " * Ultima actualizare: %s", "22.Feb.2015 13:40");
console_print(id, " * Info: %s", "http://forum.krond.org/index.php?/files/file/1-krond-functions");
console_print(id, " * Forum: %s", "http://forum.krond.org/topic/2063-krond-functions-plugin-de-securitate/");
console_print(id, " * Builder: %s", "Salmus");
console_print(id, "========================================");
if (access(id, 4))
{
console_print(id, " * Functii active: ");
if (get_cvar_num("amx_krondfunctions_cfgflood"))
{
console_print(id, " *- CFG-FLOOD: DA");
}
else
{
console_print(id, " *- CFG-FLOOD: NU");
}
if (get_cvar_num("amx_krondfunctions_specbug"))
{
console_print(id, " *- SPEC-BUG: DA");
}
else
{
console_print(id, " *- SPEC-BUG: NU");
}
if (get_cvar_num("amx_krondfunctions_autobuy"))
{
console_print(id, " *- AUTOBUY BUG: DA");
}
else
{
console_print(id, " *- AUTOBUY BUG: NU");
}
if (get_cvar_num("amx_krondfunctions_vaultclean"))
{
console_print(id, " *- VAULT CLEAN: DA");
}
else
{
console_print(id, " *- VAULT CLEAN: NU");
}
if (get_cvar_num("amx_krondfunctions_banclean"))
{
console_print(id, " *- BAN CLEAN: DA");
}
else
{
console_print(id, " *- BAN CLEAN: NU");
}
if (get_cvar_num("amx_krondfunctions_customhpk"))
{
console_print(id, " *- CUSTOMHPK: DA");
}
else
{
console_print(id, " *- CUSTOMHPK: NU");
}
if (get_cvar_num("amx_krondfunctions_hlxfix"))
{
console_print(id, " *- HLXFIX: DA");
}
else
{
console_print(id, " *- HLXFIX: NU");
}
if (get_cvar_num("amx_krondfunctions_log"))
{
console_print(id, " *- LOGARE: DA");
}
else
{
console_print(id, " *- LOGARE: NU");
}
if (get_cvar_num("amx_krondfunctions_log_admin"))
{
console_print(id, " *- LOGARE ADMINI: DA");
}
else
{
console_print(id, " *- LOGARE ADMINI: NU");
}
if (get_cvar_num("amx_krondfunctions_log_client"))
{
console_print(id, " *- LOGARE CLIENT: DA");
}
else
{
console_print(id, " *- LOGARE CLIENT: NU");
}
if (get_cvar_num("amx_krondfunctions_blockcmd"))
{
console_print(id, " *- BLOCKCMD: DA");
}
else
{
console_print(id, " *- BLOCKCMD: NU");
}
if (get_cvar_num("amx_krondfunctions_ipfake"))
{
console_print(id, " *- IPFAKE: DA");
}
else
{
console_print(id, " *- IPFAKE: NU");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
}
return 1;
}

public client_connect(id)
{
KRFUNC_SPAMFLOOD[id] = 0;
KRFUNC_SPAMFLOOD_WORK[id] = 0;
new name[32];
new authid[32];
new ip[16];
new userid = get_user_userid(id);
get_user_name(id, name, 31);
get_user_authid(id, authid, 31);
get_user_ip(id, ip, 15, 1);
if (get_cvar_num("amx_krondfunctions_hlxfix"))
{
new total[111];
new random_task_id = 0;
get_user_name(id, name, 31);
get_user_authid(id, authid, 31);
random_task_id = random_num(1, 99999);
format(total, 110, "%s\9%s\9%d\9%d", name, authid, get_user_userid(id), random_task_id);
set_task(3.00, "KRFUNC_HLXFIX", random_task_id, total, 110, "b", 0);
}
if (K_checkxpl_001(name, 1))
{
if (1 <= get_cvar_num("amx_krondfunctions_blockcmd"))
{
if (!KRFUNC_MULTILANG)
{
server_cmd("kick #%d [Krond Functions] Din motive de securitate nu poti utiliza caracterele date in nume.", userid);
}
else
{
server_cmd("kick #%d [Krond Functions] %L", userid, 0, "KF_BLOCKCMD_UNALLOWEDCHARS");
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s|%s) incearca sa se conecteze, a primit kick intrucat are in nume caractere nepermise ce pot afecta buna functionare a serverului.", "1.6.3-r10", name, ip, authid);
}
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s|%s) incearca sa se conecteze, functia este dezactivata din configuratie ! Nu pot sa-i fac nimic, desi mai mult ca sigur dauneaza serverului de joc.", "1.6.3-r10", name, ip, authid);
}
return 0;
}

public client_putinserver(id)
{
!!! Removed Phi
KRFUNC_CFGFLOOD[id] = 0;
KRFUNC_CFGFLOODING[id] = 0;
KRFUNC_CFGFLOOD_WORK[id] = 0;
KRFUNC_SPAMFLOOD[id] = 1;
KRFUNC_SPAMFLOOD_WORK[id] = 0;
KRFUNC_CHATFLOODING[id] = 0;
KRFUNC_CHATFLOOD[id] = 0;
new name[32];
new authid[32];
new ip[16];
new userid = get_user_userid(id);
get_user_name(id, name, 31);
get_user_authid(id, authid, 31);
get_user_ip(id, ip, 15, 1);
if (!is_user_bot(id))
{
if (3 < K_checkxpl_002(ip, id, 0))
{
if (1 <= get_cvar_num("amx_krondfunctions_ipfake"))
{
if (!KRFUNC_MULTILANG)
{
server_cmd("kick #%d [Krond Functions] Conectarea prezinta un potential major de flood cu boti, ban si kick pentru 30 minute.", userid);
server_cmd("addip 30 %s", ip);
server_cmd("writeip");
}
else
{
server_cmd("kick #%d [Krond Functions] %L", userid, 0, "KF_FAKEIP_KICK");
server_cmd("addip 30 %s", ip);
server_cmd("writeip");
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] FAKEIP: %s (%s|%s) incearca sa se conecteze, a primit kick/ban 30 minute - intrucat conectarea prezinta un potential major de flood cu boti.", "1.6.3-r10", name, ip, authid);
}
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] FAKEIP: %s (%s|%s) incearca sa se conecteze, functia este dezactivata din configuratie ! Probabil sa fie un flood cu boti ...", "1.6.3-r10", name, ip, authid);
}
}
return 0;
}

public client_disconnect(id)
{
KRFUNC_CFGFLOOD[id] = 0;
KRFUNC_CFGFLOODING[id] = 0;
KRFUNC_CFGFLOOD_WORK[id] = 0;
KRFUNC_SPAMFLOOD[id] = 0;
KRFUNC_SPAMFLOOD_WORK[id] = 0;
KRFUNC_CHATFLOODING[id] = 0;
KRFUNC_CHATFLOOD[id] = 0;
new ipv4_conexiuni = 0;
if (TrieGetCell(KRFUNC_PLAYERS_IPS, KRFUNC_PLAYERS_IPS_STORAGE[id][0][0], ipv4_conexiuni))
{
if (ipv4_conexiuni <= 1)
{
TrieDeleteKey(KRFUNC_PLAYERS_IPS, KRFUNC_PLAYERS_IPS_STORAGE[id][0][0]);
}
ipv4_conexiuni--;
TrieSetCell(KRFUNC_PLAYERS_IPS, KRFUNC_PLAYERS_IPS_STORAGE[id][0][0], ipv4_conexiuni);
}
KRFUNC_PLAYERS_IPS_STORAGE[id][0][0][0] = 0;
return 0;
}

public client_infochanged(id)
{
!!! Removed Phi
if (!is_user_connected(id))
{
return 0;
}
if (get_cvar_num("amx_krondfunctions_blockcmd"))
{
new name[32];
new oldname[32];
new authid[32];
new ip[16];
new userid = get_user_userid(id);
get_user_info(id, "name", name, 31);
get_user_name(id, oldname, 31);
if (equali(name, oldname, 0))
{
return 0;
}
get_user_authid(id, authid, 31);
get_user_ip(id, ip, 15, 1);
if (K_checkxpl_001(name, 1))
{
if (1 <= get_cvar_num("amx_krondfunctions_blockcmd"))
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Din motive de securitate nu poti utiliza caracterele date in chat sau in nume.");
}
else
{
console_print(id, " * %L", id, "KF_BLOCKCMD_UNALLOWEDCHARS");
}
server_cmd("kick #%d", userid);
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: \"%s\"|\"%s\" (%s:%s) si-a schimbat numele, a primit kick intrucat are in noul nume caractere nepermise ce pot afecta buna functionare a serverului.", "1.6.3-r10", name, oldname, ip, authid);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "BLOCKCMD: %s (%s) | Kicked -> A incercat sa-si schimbe numele intr-unul cu caractere nepermise", K_checkxpl_001(name, 0), ip);
cmdadminchat_announce(logadmin);
}
}
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: \"%s\"|\"%s\" (%s:%s) si-a schimbat numele, functia este dezactivata din configuratie ! Nu pot sa-i fac nimic, desi mai mult ca sigur dauneaza serverului de joc.", "1.6.3-r10", name, oldname, ip, authid);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "BLOCKCMD: %s (%s) | [ATENTIE] -> Nu pot sa-i fac nimic deoarece functia este dezactivata, cu siguranta dauneaza serverului!", K_checkxpl_001(name, 0), ip);
cmdadminchat_announce(logadmin);
}
}
if (!equali(name, oldname, 0) && is_user_connected(id))
{
KRFUNC_PUBLIC_BLOCKCMD(id, 1, 1);
}
return 0;
}
return 0;
}

public client_command(id)
{
!!! Removed Phi
if (!KRFUNC_SPAMFLOOD[id][0][0] || !is_user_connected(id))
{
return 0;
}
new comanda0[31];
read_argv(0, comanda0, 30);
trim(comanda0);
new i = 0;
while (i < 30)
{
if (equal(szBLOCKCMD[i][0][0], comanda0, 0))
{
return 0;
}
i++;
}
if (1 <= get_cvar_num("amx_krondfunctions_cfgflood"))
{
if (K_checkxpl_003(id, comanda0))
{
KRFUNC_PUBLIC_CFGFLOOD(id);
return 1;
}
}
return 0;
}

public plugin_end()
{
!!! Removed Phi
if (get_cvar_num("amx_krondfunctions_customhpk") == 1 && file_size("custom.hpk", 0) >= 1048576)
{
if (delete_file("custom.hpk") == 1 && get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] CUSTOMHPK: fisierul a fost sters deoarece avea o dimensiune mai mare de 1 MB - ceea ce poate dauna modului de functionare a serverului", "1.6.3-r10");
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] CUSTOMHPK: fisierul nu poate fi sters, nu cunosc motivele exacte ale acestei erori - va rugam contactati administratorul plugin-ului.", "1.6.3-r10");
}
}
if (get_cvar_num("amx_krondfunctions_vaultclean") == 1)
{
if (delete_file("addons/amxmodx/data/vault.ini") && get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] VAULT CLEAN: Nu am putut sa curat addons/amxmodx/data/vault.ini, probabil addons-ul lucreaza intr-un alt director ?", "1.6.3-r10");
}
}
if (KRFUNC_WEB_PLUGINUPD)
{
set_localinfo("KRFUNC_GENUINE", "");
}
return 0;
}

public KRFUNC_HLXFIX(String:total[])
{
new id = 0;
new name[32];
new authid[32];
new userid[16];
new random_id[16];
new k = 0;
new i = 0;
while (strlen(total) > i)
{
if (total[i] == 9)
{
k++;
}
else
{
if (k)
{
if (k == 1)
{
authid[i - strlen(name) - 1] = total[i];
}
if (k == 2)
{
userid[i - strlen(name) - strlen(authid) - 2] = total[i];
}
if (k == 3)
{
random_id[i - strlen(name) - strlen(authid) - strlen(userid) - 3] = total[i];
}
}
else
{
name[i] = total[i];
}
}
i++;
}
id = get_user_index(name);
if (is_user_connected(id))
{
remove_task(str_to_num(random_id), 0);
}
else
{
if (!is_user_connecting(id))
{
log_message("\"%s<%s><%s><>\" disconnected", name, userid, authid);
remove_task(str_to_num(random_id), 0);
}
}
return 0;
}

public KRFUNC_PUBLIC_SPECBUG_BLOCKVGUI(id)
{
!!! Removed Phi
if (!is_user_connected(id))
{
return 1;
}
if (get_cvar_num("amx_krondfunctions_specbug") >= 1 && !access(id, 4))
{
if (cs_get_user_team(id, 0) == 3 && str_to_float(client_vgui_data) != 1)
{
if (get_cvar_num("amx_krondfunctions_log_client") == 1)
{
ColorChat(id, ColorChat_type:2, "[Krond Functions]\1 Your command has been blocked, please have VGUI Menus enabled in order to use menus while you're spectator.");
}
return 1;
}
}
return 0;
}

public KRFUNC_PUBLIC_SPECBUG(id)
{
!!! Removed Phi
if (!is_user_connected(id))
{
return 1;
}
if (cs_get_user_team(id, 0) == 3 || cs_get_user_team(id, 0))
{
new ip[16];
get_user_ip(id, ip, 15, 1);
new name[32];
get_user_name(id, name, 31);
new userid = get_user_userid(id);
if (get_cvar_num("amx_krondfunctions_specbug") == 1)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de specbug, am hotarat ca e mai bine sa-ti dam un kick. ");
}
else
{
console_print(id, " * %L", id, "KF_SPECBUG_KICK");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] SPECBUG: %s (%s) a incercat sa dea crash serverului printr-un bug, i-am dat kick conform configuratiei.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "SPECBUG: %s (%s) | Kicked -> incercare crash server printr-un bug de engine", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
else
{
if (get_cvar_num("amx_krondfunctions_specbug") == 2)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de SPECBUG, am hotarat ca este mai bine sa ne parasesti pentru urmatoarele 15 minute.");
}
else
{
console_print(id, " * %L", id, "KF_SPECBUG_BAN");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
server_cmd("addip 15 %s", ip);
server_cmd("writeip");
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] SPECBUG: %s (%s) a incercat sa dea crash serverului printr-un bug, i-am dat kick si ban conform setarilor.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "SPECBUG: %s (%s) | Banned -> incercare crash server printr-un bug de engine", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
if (get_cvar_num("amx_krondfunctions_log_client") == 1)
{
ColorChat(id, ColorChat_type:2, "[Krond Functions]\1 Your command has been blocked, more informations please see in your console.");
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] SPECBUG: %s (%s) incearca sa dea crash serverului printr-un bug, nu pot sa-i fac nimic pentru ca valorile setate in plugin nu permit actiunea, incerc sa blochez totusi comanda.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "SPECBUG: %s (%s) | Fara actiune (blocare comanda) -> incercare crash server printr-un bug de engine", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
return 1;
}
return 0;
}

public KRFUNC_PUBLIC_CFGFLOOD(id)
{
new var2 = KRFUNC_CFGFLOOD_WORK;
new var1;
if (!var2[id][0][0])
{
KRFUNC_CFGFLOOD_WORK[id] = 1;
new ip[16];
get_user_ip(id, ip, 15, 1);
new name[32];
get_user_name(id, name, 31);
new userid = get_user_userid(id);
if (get_cvar_num("amx_krondfunctions_cfgflood") == 1)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de CFGFLOOD, am hotarat ca e mai bine sa-ti dam un kick. ");
}
else
{
console_print(id, " * %L", id, "KF_CFGFLOOD_KICK");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] CFGFLOOD: %s (%s) a incercat sa floodeze serverul prin cfgflood, i-am dat kick conform setarilor.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "CFGFLOOD: %s (%s) | Kicked -> incercare flood server prin cfgflood", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
else
{
if (get_cvar_num("amx_krondfunctions_cfgflood") == 2)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de CFGFLOOD, am hotarat ca este mai bine sa ne parasesti pentru urmatoarele 15 minute.");
}
else
{
console_print(id, " * %L", id, "KF_CFGFLOOD_BAN");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
server_cmd("addip 15 %s", ip);
server_cmd("writeip");
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] CFGFLOOD: %s (%s) a incercat sa floodeze serverul prin cfgflood, i-am dat kick si ban conform setarilor.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "CFGFLOOD: %s (%s) | Banned -> incercare flood server prin cfgflood", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] CFGFLOOD: %s (%s) incearca sa floodeze serverul prin cfgflood, nu pot sa-i fac nimic pentru ca valorile setate in plugin nu permit actiunea.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "CFGFLOOD: %s (%s) | Fara actiune (configuratie) -> incercare flood server prin cfgflood", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
new var3 = KRFUNC_CFGFLOOD_WORK[id];
var3 = 0;
var1 = var3;
}
else
{
var1 = var2;
}
return 0;
}

bool:KRFUNC_PUBLIC_AUTOBUY_LONG(String:string[], len)
{
static cmd[512];
while (strlen(string))
{
strtok(string, "", 511, string, len, 32, 1);
if (31 < strlen(cmd))
{
return true;
}
}
return false;
}

public KRFUNC_PUBLIC_AUTOBUY(id)
{
if (!is_user_connected(id))
{
return 1;
}
new ip[16];
get_user_ip(id, ip, 15, 1);
new name[32];
get_user_name(id, name, 31);
new userid = get_user_userid(id);
static i;
static args;
static arg[512];
args = read_argc();
i = 1;
while (i < args)
{
read_argv(i, arg, 511);
if (KRFUNC_PUBLIC_AUTOBUY_LONG(arg, 511))
{
if (get_cvar_num("amx_krondfunctions_autobuy") == 1)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de AUTOBUY BUG, am hotarat ca e mai bine sa-ti dam un kick. ");
}
else
{
console_print(id, " * %L", id, "KF_AUTOBUY_KICK");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] AUTOBUY BUG: %s (%s) a incercat sa dea crash serverului printr-un bug, i-am dat kick conform setarilor.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "AUTOBUY: %s (%s) | Kicked -> incercare crash server printr-un bug de engine", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
else
{
if (get_cvar_num("amx_krondfunctions_autobuy") == 2)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de AUTOBUY BUG, am hotarat ca este mai bine sa ne parasesti pentru urmatoarele 15 minute.");
}
else
{
console_print(id, " * %L", id, "KF_AUTOBUY_BAN");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
server_cmd("addip 15 %s", ip);
server_cmd("writeip");
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] AUTOBUY BUG: %s (%s) a incercat sa dea crash serverului printr-un bug, i-am dat kick si ban conform setarilor.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "AUTOBUY: %s (%s) | Banned -> incercare crash server printr-un bug de engine", name, ip);
cmdadminchat_announce(logadmin);
}
}
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] AUTOBUY BUG: %s (%s) incearca sa dea crash serverului printr-un bug, nu pot sa-i fac nimic pentru ca valorile setate in plugin nu permit actiunea, incerc sa blochez insa comanda.", "1.6.3-r10", name, ip);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "AUTOBUY: %s (%s) | Fara actiune (blocare comanda) -> incercare crash server printr-un bug de engine", name, ip);
cmdadminchat_announce(logadmin);
}
if (get_cvar_num("amx_krondfunctions_log_client") == 1)
{
ColorChat(id, ColorChat_type:2, "[Krond Functions]\1 Your command has been blocked, more informations please see in your console.");
}
}
}
return 1;
}
i += 1;
}
return 0;
}

public KRFUNC_PUBLIC_BLOCKCMD(id, Kredirectionare, redirsource)
{
!!! Removed Phi
if (!is_user_connected(id) || is_user_hltv(id))
{
return 1;
}
new ip[16];
get_user_ip(id, ip, 15, 1);
new name[32];
get_user_name(id, name, 31);
new userid = get_user_userid(id);
new szSaid[192];
new szSaid_clean[192];
new szCmd[51];
new szSaid_orig[192];
read_args(szSaid, 191);
remove_quotes(szSaid);
trim(szSaid);
copy(szSaid_orig, 191, szSaid);
string_cleaner(szSaid);
copy(szSaid_clean, 191, szSaid);
K_checkxpl_001(szSaid_clean, 0);
read_argv(0, szCmd, 50);
trim(szCmd);
new Float:maxChat = 0.75/*1061158912*/;
if (Kredirectionare)
{
switch (redirsource)
{
case 1:
{
maxChat += 2.00;
redirsource = 2;
szSaid[0] = 279016;
szCmd[0] = 279084;
}
default:
{
redirsource = 1;
}
}
}
else
{
redirsource = 1;
}
if (1 <= get_cvar_num("amx_krondfunctions_blockcmd"))
{
if (!KRFUNC_SPAMFLOOD[id][0][0])
{
if (get_cvar_num("amx_krondfunctions_log") == 1 && !KRFUNC_SPAMFLOOD_WORK[id][0][0])
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s) incearca sa transmita o comanda la server, dar inca nu a fost autorizat (nu a intrat in joc) -> POSIBIL SPAM, am blocat comanda ! [LASTCMD: \"%s %s\"]", "1.6.3-r10", name, ip, szCmd, szSaid);
KRFUNC_SPAMFLOOD_WORK[id] = 1;
}
return 1;
}
if (get_cvar_num("amx_krondfunctions_blockcmd") == 2 && get_user_time(id, 0) < 15)
{
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s) incearca sa afecteze buna functionare a serverului spamand chat-ul in primele 15 secunde de la conectare -> POSIBIL SPAM, am blocat comanda ! [LASTCMD: \"%s %s\"]", "1.6.3-r10", name, ip, szCmd, szSaid);
}
return 1;
}
new Float:nexTime = get_gametime();
if (KRFUNC_CHATFLOODING[id][0][0] > nexTime)
{
if (15 <= KRFUNC_CHATFLOOD[id][0][0])
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de CHAT FLOOD, am hotarat ca este mai bine sa-ti dam un kick. ");
}
else
{
console_print(id, " * %L", id, "KF_BLOCKCMD_KICK");
}
console_print(id, "----------------------------------------------------------------------------------------------------");
server_cmd("kick #%d", userid);
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s) ataca serverul constant cu mesaje de tip chat/radio/name change, i-am dat kick fortat ca sa nu afecteze buna functionare a serverului. [LASTCMD: \"%s %s\"]", "1.6.3-r10", name, ip, szCmd, szSaid);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "BLOCKCMD: %s (%s) | Kicked -> flood de chat/mesaje radio sau name change spam", name, ip);
cmdadminchat_announce(logadmin);
}
}
return 1;
}
if (5 <= KRFUNC_CHATFLOOD[id][0][0])
{
KRFUNC_CHATFLOODING[id] = KRFUNC_CHATFLOODING[id][0][0] - nexTime + nexTime + maxChat + 3.00;
KRFUNC_CHATFLOOD[id] = redirsource + KRFUNC_CHATFLOOD[id][0][0];
if (get_cvar_num("amx_krondfunctions_log_client") == 1)
{
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Esti suspectat de CHAT FLOOD, incearca sa reduci numarul de mesaje chat transmise catre server.");
console_print(id, " * Pentru urmatoarele %f secunde nu vei mai putea transmite mesaje chat catre server.", KRFUNC_CHATFLOODING[id][0][0] - nexTime);
console_print(id, " * Avertizarea %d / 10 la limita careia vei primi kick, opreste spamul de chat!", KRFUNC_CHATFLOOD[id][0][0] - 5);
}
else
{
console_print(id, " * %L", id, "KF_BLOCKCMD_INFORM", KRFUNC_CHATFLOODING[id][0][0] - nexTime);
console_print(id, " * %L", id, "KF_BLOCKCMD_INFORM_COUNTDOWN_1", KRFUNC_CHATFLOODING[id][0][0] - nexTime);
console_print(id, " * %L", id, "KF_BLOCKCMD_INFORM_COUNTDOWN_2", KRFUNC_CHATFLOOD[id][0][0] - 5);
}
ColorChat(id, ColorChat_type:2, "[Krond Functions]\1 Your command has been blocked, more informations please see in your console.");
console_print(id, "----------------------------------------------------------------------------------------------------");
}
if (!KRFUNC_SPAMFLOOD_WORK[id][0][0])
{
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s) incearca sa spameze chat-ul sau prin schimbari de nume, am blocat comanda precum si urmatoarele comenzi (temporar) de la acest client [LASTCMD: \"%s %s\"]", "1.6.3-r10", name, ip, szCmd, szSaid);
if (get_cvar_num("amx_krondfunctions_log_admin") == 1)
{
new logadmin[173];
format(logadmin, 172, "BLOCKCMD: %s (%s) | Blocaj comanda + gag temporar -> flood de chat/radio ori schimbari de nume.", name, ip);
cmdadminchat_announce(logadmin);
}
}
KRFUNC_SPAMFLOOD_WORK[id] = 1;
}
return 1;
}
KRFUNC_CHATFLOOD[id] = redirsource + KRFUNC_CHATFLOOD[id][0][0];
}
else
{
if (KRFUNC_CHATFLOOD[id][0][0])
{
KRFUNC_CHATFLOOD[id] = 0;
KRFUNC_CHATFLOODING[id] = 0;
KRFUNC_SPAMFLOOD_WORK[id] = 0;
}
}
KRFUNC_CHATFLOODING[id] = nexTime + maxChat;
if (Kredirectionare)
{
return 0;
}
if (!equal(szSaid, szSaid_clean, 0) || K_checkxpl_001(name, 1))
{
if (get_cvar_num("amx_krondfunctions_log_client") == 1)
{
ColorChat(id, ColorChat_type:2, "[Krond Functions]\1 Your command has been blocked (unallowed chars), more informations please see in your console.");
console_print(id, "----------------------------------------------------------------------------------------------------");
console_print(id, "[Krond Functions] ");
if (!KRFUNC_MULTILANG)
{
console_print(id, " * Din motive de securitate nu poti utiliza caracterele folosite in chat sau in nume.");
}
console_print(id, " * %L", id, "KF_BLOCKCMD_UNALLOWEDCHARS");
}
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] BLOCKCMD: %s (%s) incearca sa afecteze buna functionare a serverului utilizand un bug de plugin ori engine, am blocat comanda ! [LASTCMD: \"%s %s\"]", "1.6.3-r10", name, ip, szCmd, szSaid);
}
return 1;
}
if (!equal(szSaid, szSaid_orig, 0))
{
engclient_cmd(id, szCmd, szSaid, "");
return 1;
}
}
return 0;
}

public KRFUNC_PUBLIC_AUTOCONFCLASS()
{
!!! Removed Phi
if (file_exists(KRFUNC_CONFFULL) && get_cvar_num("amx_krondfunctions_rewriteconf") == 1)
{
if (delete_file(KRFUNC_CONFFULL))
{
if (get_cvar_num("amx_krondfunctions_log") == 1)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] REWRITECONF: fisierul de configurare a fost rescris, conform configuratiei", "1.6.3-r10");
}
set_cvar_num("amx_krondfunctions_rewriteconf", 0);
}
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] REWRITECONF: fisierul nu poate fi sters pentru rescriere ulterioara, contactati administratorul.", "1.6.3-r10");
set_cvar_num("amx_krondfunctions_rewriteconf", 0);
return 0;
}
if (!file_exists(KRFUNC_CONFFULL))
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] REWRITECONF: Fisierul %s nu exista, l-am rescris si executat", "1.6.3-r10", KRFUNC_CONFFULL);
write_file(KRFUNC_CONFFULL, "// ==================================================", -1);
write_file(KRFUNC_CONFFULL, "// ============= Krond Solutions @ 2014 =============", -1);
write_file(KRFUNC_CONFFULL, "// ==================================================", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// ====== Krond Functions 1.6.3-stable ======", -1);
write_file(KRFUNC_CONFFULL, "// URL: http://forum.krond.org/index.php?/files ... -functions", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_cfgflood", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Urmareste si inlatura conform setarilor pe toti cei care incearca sa floodeze serverul prin traditionalele config-uri executate in consola", -1);
write_file(KRFUNC_CONFFULL, "// Impact: Serverul experimenteaza lag peste 200+ la orice jucator prezent pe server, fiind floodat prin 'fullupdate'", -1);
write_file(KRFUNC_CONFFULL, "// Update: Incepand de la versiunea 1.5.2, filtrarea floodului prin config nu mai este insotita de alarme false, in speta cvar-ul pentru imunitate admini este scos.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: functia este dezactivata complet, se va incerca doar stoparea efectului", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: setat in mod implicit (default), kick la atacator.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 2: setat in mod agresiv, kick si ban la atacator", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_cfgflood 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_specbug", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Urmareste si inlatura conform setarilor pe toti cei care incearca sa afecteze buna functionare a serverului prin specbug ", -1);
write_file(KRFUNC_CONFFULL, "// Impact: Serverul primeste crash in momentul in care se apeleaza la acest bug ", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: se va bloca efectul, jucatorul ce incearca sa faca asta nu va fi pedepsit ", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: setat in mod preventiv, va urmari activitatea si va executa kick la individul ce incearca sa ne faca probleme. ", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 2: setat in mod agresiv, va urmari activitatea si va executa kick+ban 15 minute la individul ce incearca sa ne faca probleme. ", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_specbug 1 ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_autobuy", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Urmareste si inlatura conform setarilor pe toti cei care incearca sa afecteze buna functionare a serverului prin autobuy ", -1);
write_file(KRFUNC_CONFFULL, "// Impact: Serverul primeste crash in momentul in care se apeleaza la acest bug", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: se va bloca efectul (crash-ul in sine), jucatorul ce incearca sa faca asta nu va fi pedepsit (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Va urmari activitatea si va executa kick respectivului.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 2: setat in mod agresiv, va urmari activitatea si va executa kick+ban 15 minute la individul ce incearca sa ne faca probleme.", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_autobuy 0", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_blockcmd", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Urmareste tabela de chat in scopul unor activitati suspecte ce pot declansa un comportament nedorit serverului din pricina bug-urilor existente in plugin-urile instalate ori spam-uri de chat ", -1);
write_file(KRFUNC_CONFFULL, "// Impact: In functie de bug, se poate ajunge la blocarea serverului, crash ori chiar freeze care nu se poate repara decat cu hard-restart", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: functia este dezactivata complet, NU se va incerca stoparea efectului", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: setat in mod implicit (default), va urmari comportamentul jucatorului si va bloca eventuala activitate suspecta.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 2: setat in mod agresiv, va urmari comportamentul jucatorului si va bloca eventuala activitate suspecta, blocand in acelasi timp chat-ul celor ce sunt conectati de mai putin de 15 secunde (posibil boti de spam)", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_blockcmd 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_ipfake", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Urmareste conectarea jucatorilor multipli (falsi) ce pot declansa un comportament nedorit serverului.", -1);
write_file(KRFUNC_CONFFULL, "// Impact: In functie de bug, se poate ajunge la blocarea serverului, crash ori chiar freeze care nu se poate repara decat cu hard-restart", -1);
write_file(KRFUNC_CONFFULL, "// ATENTIE: Solutia nu este perfecta, in mod cert va aduce probleme indeosebi pe servere de war unde mai multi jucatori au aceiasi adresa de IP - insa alta solutie nu exista pentru serverele nonsteam publice. ", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: functia este dezactivata complet, NU se va incerca stoparea efectului", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: setata in mod implicit (default), nu va permite mai mult de 3 conexiuni de pe aceiasi adresa de IP.", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_ipfake 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_vaultclean", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Inainte de schimbarea hartii, in plugin_end - se va sterge vault.ini ", -1);
write_file(KRFUNC_CONFFULL, "// Impact: Serverul incarca foarte greu noua harta, in cazul in care vault.ini are o dimensiune chiar si de cativa KB", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: functia este dezactivata complet, plugin-ul nu va actiona", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: setat in mod implicit (default), va sterge fisierul addons/amxmodx/data/vault.ini inainte de schimbarea hartii", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_vaultclean 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_banclean", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Curata banurile de pe server date pe IP-ul serverului, clasa serverului sau 0.0.0.0 ", -1);
write_file(KRFUNC_CONFFULL, "// Impact: In cazul in care un admin pune ban pe clasele serverului - plugin-ul va scoate acest ban.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: functia este dezactivata complet, nu se vor scoate banurile.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: setat in mod implicit (default), se vor scoate banurile pe clasa serverului sau pe 0.0.0.0", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_banclean 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_customhpk", -1);
write_file(KRFUNC_CONFFULL, "// Scop: La finalul fiecarei harti, se va verifica daca binecunoscutul fisier custom.hpk poate creea probleme prin dimensiuniile sale ce depasesc 1 MB, in cazul in care setarea este activa iar custom.hpk are mai mult de 1 MB - se va sterge fisierul.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: Inactiv ", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Activ (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_customhpk 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_hlxfix", -1);
write_file(KRFUNC_CONFFULL, "// Scop: Sunt situatii in care statistica HLSTATSX: CE (gazduita la Krond sau nu), afiseaza jucatori online eronati, de exemplu 44/32 (adica 44 jucatori online din 32 posibili) - aceasta functie rezolva situatia prin generarea de loguri extinse pentru HLX", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: Inactiv (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Activ", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_hlxfix 0", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_log", -1);
write_file(KRFUNC_CONFFULL, "// Scop: permitem sau nu plugin-ului sa ne creeze krond-functions.log in directorul /logs/ - mesajele critice vor fi scrise indiferent de valoarea setata", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: Inactiv", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Activ (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_log 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_log_admin", -1);
write_file(KRFUNC_CONFFULL, "// Scop: permitem sau nu plugin-ului sa transmita cate un mesaj la fiecare admin online cu acces de ADMIN_KICK, mesajele vor contine informari cu privire la actiunile de kick/ban/gag ale plugin-ului de securitate.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: Inactiv", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Activ (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_log_admin 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_log_client", -1);
write_file(KRFUNC_CONFFULL, "// Scop: In cazul in care functiile specbug sau autobuy bug sunt pe zero (blocarea actiunii) iar valoarea acestui cvar este pozitiva, vom transmite un mesaj clientului prin care il informam referitor la blocarea actiunii in cauza.", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: Inactiv", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Activ (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_log_client 1", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, " ", -1);
write_file(KRFUNC_CONFFULL, "// -> amx_krondfunctions_advertise", -1);
write_file(KRFUNC_CONFFULL, "// Scop: In cazul in care doriti sa ne ajutati comunicand jucatorilor dumneavoastra la fiecare 5 minute ca serverul este protejat de Krond Functions, puneti pe 1 acest cvar", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 0: Inactiv", -1);
write_file(KRFUNC_CONFFULL, "// Valoarea 1: Activ (valoare implicita)", -1);
write_file(KRFUNC_CONFFULL, "amx_krondfunctions_advertise 1", -1);
write_file(KRFUNC_CONFFULL, "// ==================================================", -1);
write_file(KRFUNC_CONFFULL, "// ==================================================", -1);
}
server_cmd("exec %s", KRFUNC_CONFFULL);
return 0;
}

public string_cleaner(String:str[])
{
!!! Removed Phi
new len = strlen(str);
new i = 0;
while (i < len)
{
new var1 = str[i];
if (32 > var1 & 0 < var1)
{
str[i] = 32;
i++;
}
i++;
}
return 0;
}

public K_checkxpl_001(String:str[], status)
{
!!! Removed Phi
if (matchRCHAT >= REGEX_OK || containi(str, "#buy") == -1)
{
if (status)
{
return 1;
}
while (contain(str, "#") != -1)
{
replace(str, len, "#", " ");
}
}
if (containi(str, "%s") == -1 && containi(str, "%d") == -1 && containi(str, "%f") == -1)
{
if (status)
{
return 1;
}
while (contain(str, "%") != -1)
{
replace(str, len, "%", " ");
}
}
if (status)
{
return 0;
}
return 0;
}

public K_checkxpl_002(String:ipv4[], id, checkonly)
{
copy(KRFUNC_PLAYERS_IPS_STORAGE[id][0][0], 15, ipv4);
new ipv4_conexiuni = 0;
if (!TrieGetCell(KRFUNC_PLAYERS_IPS, ipv4, ipv4_conexiuni))
{
ipv4_conexiuni = 0;
}
if (!checkonly)
{
ipv4_conexiuni++;
TrieSetCell(KRFUNC_PLAYERS_IPS, ipv4, ipv4_conexiuni);
}
return ipv4_conexiuni;
}

public K_checkxpl_003(id, String:comanda[])
{
!!! Removed Phi
new Float:nexTime = get_gametime();
new Float:maxChat = 0.25/*1048576000*/;
new threshold = 100;
if (KRFUNC_CFGFLOODING[id][0][0] > nexTime)
{
if (threshold <= KRFUNC_CFGFLOOD[id][0][0])
{
return 1;
}
KRFUNC_CFGFLOOD[id]++;
}
else
{
if (KRFUNC_CFGFLOOD[id][0][0])
{
KRFUNC_CFGFLOOD[id] = 0;
KRFUNC_CFGFLOODING[id] = 0;
}
}
KRFUNC_CFGFLOODING[id] = nexTime + maxChat;
return 0;
}

public cmdadminchat_announce(String:Kmsg[])
{
if (strlen(Kmsg))
{
new message[182];
copy(message, 181, Kmsg);
format(message, 181, "[Krond Functions]\1 %s", message);
new players[32];
new inum = 0;
new pl = 0;
get_players(players, inum, "ch", "");
new i = 0;
while (i < inum)
{
pl = players[i];
if (access(pl, 4))
{
ColorChat(pl, ColorChat_type:2, message);
i++;
}
i++;
}
return 0;
}
return 0;
}

public KRFUNC_PUBLIC_UPDATEPLUGIN()
{
new tempfile[14];
do {
formatex(tempfile, 13, "temp%d.amxx", random_num(1000, 9999));
} while (file_exists(tempfile));
HTTP2_Download(KRFUNC_WEB_PLUGINURL, tempfile, "KRFUNC_PUBLIC_UPDATEPLUGIN_C", "", 0.00/*-2147483648*/, 0, "", "");
return 0;
}

public KRFUNC_PUBLIC_UPDATEPLUGIN_C(Index, Error)
{
new pluginfile[320];
new tempfile[14];
new temp[1];
new len = 0;
if (Error)
{
get_plugin(-1, pluginfile, 319, temp, 0, temp, 0, temp, 0, temp, 0);
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Eroare la descarcarea update-ului, contactati support!", "1.6.3-r10");
return 0;
}
HTTP2_getFilename(Index, tempfile, 13);
len = get_localinfo("amxx_pluginsdir", pluginfile, 319);
len++;
pluginfile[len] = 47;
get_plugin(-1, pluginfile[len], 319 - len, temp, 0, temp, 0, temp, 0, temp, 0);
delete_file(pluginfile);
rename_file(tempfile, pluginfile, 1);
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Update efectuat la versiunea %s.", "1.6.3-r10", KRFUNC_WEB_PLUGINVER);
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Documentatie: %s", "1.6.3-r10", "http://forum.krond.org/index.php?/files/file/1-krond-functions");
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Forum: %s", "1.6.3-r10", "http://forum.krond.org/topic/2063-krond-functions-plugin-de-securitate/");
KRFUNC_WEB_PLUGINUPD = 1;
set_task(30.00, "KRFUNC_PUBLIC_UPDATEPLUGIN_R", 0, "", 0, "", 0);
return 0;
}

public KRFUNC_PUBLIC_UPDATEPLUGIN_R()
{
new players[32];
new playersnum = 0;
new curmap[33];
get_players(players, playersnum, "ch", "");
get_mapname(curmap, 32);
if (playersnum < 2)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: ## Nu sunt jucatori online, reincarcam harta dupa update-ul plugin-ului", "1.6.3-r10");
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: ## -> changelevel %s", "1.6.3-r10", curmap);
set_localinfo("KRFUNC_GENUINE", "");
server_cmd("changelevel %s", curmap);
}
return 0;
}

public KRFUNC_PUBLIC_UPDATEPLUGIN_CHK()
{
!!! Removed Phi
if (!equal("", "0", 0) && equal("", "1.6.3-r10", 0))
{
new pluginfile[320];
new temp[1];
new len = 0;
new md5buffer[34];
len = get_localinfo("amxx_pluginsdir", pluginfile, 319);
len++;
pluginfile[len] = 47;
get_plugin(-1, pluginfile[len], 319 - len, temp, 0, temp, 0, temp, 0, temp, 0);
md5_file(pluginfile, md5buffer);
trim(md5buffer);
if (!equal(md5buffer, "", 0))
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Verificare md5sum: FAIL! | L:%s/O:%s", "1.6.3-r10", md5buffer, KRFUNC_WEB_PLUGINMD5);
if (!KRFUNC_WEB_PLUGINUPD)
{
log_to_file(KRFUNC_LOGFILE, "[Krond Functions %s] GENUINE: -> Intrucat fisierul pare a fi modificat, incerc sa descarc dinou plugin-ul", "1.6.3-r10");
KRFUNC_PUBLIC_UPDATEPLUGIN();
}
}
}
return 1;
}


14 Jul 2018 14:16
Profile multumesc WWW
Super moderator
Super moderator
User avatar

Joined: 24 Mar 2011 23:32
Posts: 4997
Location: Caracal
Detinator Steam: Da
Reputatie: Super Moderator
Moderatorul anului 2016
Intermediar
Fond eXtream: 0
Trebuia sa pui si un tracert. Corect cu ce ai spus dar te rog sa nu facem din acest topic un chat. Din start ai gresit cand ai spus 100% si ai insirat niste cuvinte premium (pompoase) ca sa le pot spune asa precum layer 7. Am si precizat indirect ca un atac puternic ddos poate face probleme si protectie 100% nu exista, nimic 100% nu exista. A recomanda cloudflare nu este nimic rau, vorbim despre un tip de gazduire web middle unde nu ti se ofera exact toate facilitatile.

Pentru intrebari, propuneri sau probleme va rog sa deschideti un ticket sau sa folositi formularul de contact.


14 Jul 2018 22:02
Profile multumesc WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 31 posts ]  Go to page Previous  1, 2, 3

Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group