Created
February 10, 2015 21:06
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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