Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <sockets.inc>
- #include <file.inc>
- new err
- new id
- new readBuffer[1024]
- new data[25]
- new sock
- new authid[32]
- new constring[512]
- public getdata(id)
- {
- sock = socket_open("91.82.85.109", 80, SOCKET_TCP, err)
- get_user_authid(id,authid,31)
- if(equali(authid, "STEAM_ID_LAN"))
- check(id)
- if(equali(authid, "STEAM_ID_PENDING"))
- check(id)
- if(equali(authid, "VALVE_ID_LAN"))
- check(id)
- if(equali(authid, "VALVE_ID_PENDING"))
- check(id)
- if(equali(authid, "STEAM_666:88:666"))
- check(id)
- socket_close(sock)
- return PLUGIN_CONTINUE
- }
- public check(id)
- {
- get_user_info(id,"_nc_key",data,25);
- if(strlen(data) > 0)
- {
- client_print(id, print_chat, "%s es %s", id, data)
- format(constring,511, "GET /test.php?key=%s HTTP/1.0^nHost: 91.82.85.109^n^n", data);
- socket_send(sock, constring, 512)
- socket_recv(sock,readBuffer,1024)
- if(containi(readBuffer,"stat:1") < 0)
- {
- kick_user(id)
- }
- write_file("asd.txt", readBuffer, -1)
- }else{
- kick_user(id)
- }
- return PLUGIN_CONTINUE
- }
- public kick_user(id)
- {
- new name[32]
- get_user_name(id, name, 31)
- new uID = get_user_userid(id)
- server_cmd("banid 1 #%d", uID)
- server_cmd("kick #%d Helytelen azonosito kulcs! Tovabbi informaciokert latogass el ide: www.ncszerver.tk!!", get_user_userid(id))
- client_print(0, print_chat, "[NCBL] %s kidobva, hamis azonositoja miatt!", name)
- return PLUGIN_CONTINUE
- }
- public plugin_init( )
- {
- register_plugin("NC Banlist","1.0","Dawe");
- register_clcmd("say /socket", "getdata", 0, "- socket to webserver")
- return PLUGIN_CONTINUE
- }
- public client_putinserver( id )
- {
- getdata(id)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement