#include <amxmodx>
#include <amxmisc>
 
public plugin_init() {
	register_plugin("LAC AMXX addon", "0.6a", "LuCiFer")
	register_concmd("amx_lac_ban", "amx_lac_ban", ADMIN_KICK, "<nick or part of nick; time; reason - ban user >")
	register_concmd("amx_lac_unban", "amx_lac_unban", ADMIN_KICK, "<nick or part of nick; time; reason - unban user >")
	register_concmd("amx_lac_ss", "amx_lac_ss", ADMIN_KICK, "<nick or part of nick - take screenshot from user >")
	register_concmd("amx_lac_bans", "amx_lac_bans", ADMIN_KICK, "<nick or part of nick - view server ban list >")
	register_concmd("amx_lac_ubans", "amx_lac_ubans", ADMIN_KICK, "<nick or part of nick - view central ban list >")
	register_concmd("amx_lac_crc", "amx_lac_crc", ADMIN_KICK, "<nick or part of nick; file name - calc CRC for file on client >")
	register_concmd("amx_lac_ubl", "amx_lac_ubl", ADMIN_KICK, "< - update central ban list from server now >")
	register_concmd("amx_lac_cban", "amx_lac_cban", ADMIN_KICK, "< - cleanup ban list >")
	return PLUGIN_CONTINUE
}

public amx_lac_cban (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_cban %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_ban (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
server_cmd("lac_wdb %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_ban %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_unban (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
server_cmd("lac_wdb %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_unban %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_ss (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_ss %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_bans (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_bans %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_ubans (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_ubans %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_crc (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_crc %s", str)
  return PLUGIN_HANDLED
}

public amx_lac_ubl (id, level, cid) {
if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
server_cmd("lac_aid %d", id)
new str[255]
read_args(str, 255)
server_cmd("lac_lac_ubl %s", str)
  return PLUGIN_HANDLED
}
