/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Anti Fullupdate Spam"
#define VERSION "2.0"
#define AUTHOR "Pike"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("fullupdate","fullupdate")
	
}
new floodcounter[33]

public client_connect(id)
{
        floodcounter[id] = 0
}

public fullupdate(id)
{
	floodcounter[id]++

	if(floodcounter[id]>=4)
		{
			hackDetected(id)
	}
	return PLUGIN_HANDLED
}
public hackDetected(id)
{
   new name[32], ip[32], authid[32]
   get_user_name(id, name, 31)
   get_user_ip(id, ip, 31, 1)
   get_user_authid(id, authid, 31)
			
   server_cmd("kick #%d ^"Using fullupdate spam command^"", get_user_userid(id))
   log_to_file("addons\amxmodx\logs\fullupdate_spam.txt","%s <%s> %s Using fullupdate spam command", name, authid, ip)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
