Skip to content

Instantly share code, notes, and snippets.

@overjt
Created February 10, 2015 21:06
Show Gist options
  • Save overjt/0774aeaeea1fe08fc148 to your computer and use it in GitHub Desktop.
Save overjt/0774aeaeea1fe08fc148 to your computer and use it in GitHub Desktop.
Bloquea y desbloquea a un usuario con el fin de joderle el karma y el rango
function karmatroll(b) {
var datos = {
key: global_data.user_key,
user: $($("a[obj=user]")[0]).attr("objid")
}
if (b == 1){
datos["bloqueado"] = 1;
}
$.ajax({
url: '/ajax/user/block',
type: 'post',
data: datos,
success: function(data) {
if (data == "1: El usuario fue desbloqueado satisfactoriamente"){
karmatroll(1);
}else{
karmatroll(0);
}
}
});
}
karmatroll(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment