#include <amxmodx>
new const bmNicklerINI[] = "addons/amxmodx/configs/yasaklinickler.ini";
new bmNickler[64][38],bmNickSayi;
#define bmDakika 999999
public plugin_init() {
register_plugin
("Yasakli Nick",
"1.0",
"Berk");
new bmFO = fopen(bmNicklerINI, "rt");
if(bmFO){
new bmVeri[256],i = 1;
while(!feof(bmFO)) {
fgets(bmFO, bmVeri, charsmax(bmVeri));
copy(bmNickler[i],37,bmVeri);
i++;
}
bmNickSayi = i;
fclose(bmFO);
bmFO = 0;
}
}
public client_putinserver(bmID){
new bmIsim[38];
get_user_name(bmID,bmIsim,charsmax(bmIsim));
for(new i = 1; i < bmNickSayi; i++){
new bmIsimINI[38];
parse(bmNickler[i],bmIsimINI,charsmax(bmIsimINI));
if(equali(bmIsim,bmIsimINI)){
new bmUserID,bmAuthID[26],bmIP[14];
get_user_ip(bmID,bmIP,charsmax(bmIP),1);
get_user_authid(bmID,bmAuthID,charsmax(bmAuthID));
bmUserID = get_user_userid(bmID);
server_cmd("kick #%d ^"Yasakli Nick Kullanimi^";wait;banid %i %s;wait;writeid", bmUserID,bmDakika,bmAuthID);
server_cmd("wait;addip %i ^"%s^";wait;writeip",bmDakika,bmIP);
}
}
}