Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Check my user cheat (http://www.mysidiaadoptables.com/forum/showthread.php?t=2124)

darkenix 04-27-2011 09:43 PM

Check my user cheat
 
Hellos all, sorry if you do not understand but I'm using google translator because I speak Spanish

Well first of all, I have installed the latest version der Mysidia, and even my game is working now, but the problem is:

I have cheats that users create characters, to send money fast, but the problem is that I can detect the user's ip, but I can few saver accounts have to lower the lvl and check if they really are cheating.

Enter the database of my cpanel of my hosting, Table bd_users but nungun side is the user ip.

The single user ip I can see in Table bd_vote__voters, but from there I can not comprovar nothing good I can do in this case?

Greetings attn: Darkenix.

Kaeliah 04-28-2011 01:36 AM

Hola darkenix!

Creo que entiendo lo que usted está tratando de decir. ¿Quieres comprobar si los usuarios están engañando a la creación de más de una cuenta en la misma IP?

En la actualidad el único lugar para ver IP de un usuario está en la tabla vote_voters, pero lo que puedes hacer es agregar el siguiente código a su página register.php. Usted tendrá que abrir la página en el bloc de notas o un editor similar y editar el código.

Buscar este pedazo de código en register.php:

PHP Code:

    $flag 0;
    
$query "SELECT * FROM ".$prefix."users WHERE username = '$username'";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result); 

después de eso, copiar y pegar el siguiente:

PHP Code:

        $ip $_SERVER['REMOTE_ADDR']; 
        
$ip preg_replace("/[^a-zA-Z0-9@._-]/"""$ip);
        
$ip secure($ip);
 
    
$query "SELECT * FROM ".$prefix."vote_voters WHERE ip = '$ip' AND (username != '' OR username IS NOT NULL)";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result);

    if(
$num 0){
    
$flag 1;
    } 


Lo que el código va a hacer es que se revise la tabla vote_voters y ver si la persona que registre una nueva cuenta ha hecho clic en un adopten en virtud de un nombre de usuario diferente. Si la IP se corresponde con una ip en la tabla vote_voters y hay un nombre de usuario aparecerán junto a ella, entonces no permitirá que el tramposo para registrar una nueva cuenta. No va a detener todas las trampas, pero va a parar la mayor parte de ella.

----

Hi darkenix!

I think I understand what you are trying to say. You want to check to see if users are cheating by creating more than one account on the same IP?

Currently the only place to see a user's IP is in the vote_voters table, but what you can do is add the following code to your Register.php page. You will need to open up the page in notepad or a similar editor and edit the code.

Find this piece of coding in register.php:
PHP Code:

    $flag 0;
    
$query "SELECT * FROM ".$prefix."users WHERE username = '$username'";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result); 

after that, copy and paste the following:
PHP Code:

        $ip $_SERVER['REMOTE_ADDR']; 
        
$ip preg_replace("/[^a-zA-Z0-9@._-]/"""$ip);
        
$ip secure($ip);
 
    
$query "SELECT * FROM ".$prefix."vote_voters WHERE ip = '$ip' AND (username != '' OR username IS NOT NULL)";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result);

    if(
$num 0){
    
$flag 1;
    } 

What this code will do is it will check the vote_voters table and see if the person registering a new account has clicked an adopt under a different user name. If the ip does match an ip in the vote_voters table and there is a username listed with it, then it will not allow the cheater to register a new account. It won't stop all cheating, but it will stop most of it.

darkenix 04-28-2011 01:27 PM

Thank you very much ^^.

Kaeliah 04-28-2011 05:46 PM

I'm glad I was able to help!

Solistia 05-04-2011 01:07 PM

Actually, I just found out this mod does not work properly. I had tried to sign-up at DarkEnix's Guildwarrior and got an error that my username was already in use (I tried 3 different user names, none of which were in the members list), and gave up.

It wasn't until a friend of mine told me she was having that problem on my site, that I realized the error came from here (since I added the code to my site as well). As soon as I deleted it, she was able to register.

Perhaps it was making it so anyone that clicked, even guests, could not register an account?

If there's a way you could fix this to work, that'd be wonderful =D

Kaeliah 05-05-2011 08:56 AM

I don't know why it's not working. Did you get any errors? what exactly was happening incorrectly?

Solistia 05-05-2011 01:13 PM

Whenever someone tries to register that has already clicked on an adoptable, even if they haven't registered before, cannot register, and brings up the error "This username is already in use".

Somehow the information you're pulling from doesn't seem to differentiate between people who have already registered and people who haven't. Anyone that has clicked a pet cannot register.

Kaeliah 05-05-2011 04:32 PM

Well the issue my guess is with the query. I see what the problem is. The IS NOT NULL is the issue, because even if the entry is blank, it returns not null. Bad design on my part, sorry. Try this and see if it works.

PHP Code:

        $ip $_SERVER['REMOTE_ADDR']; 
        
$ip preg_replace("/[^a-zA-Z0-9@._-]/"""$ip);
        
$ip secure($ip);
 
    
$query "SELECT * FROM ".$prefix."vote_voters WHERE ip = '$ip' AND username != ''";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result);

    if(
$num 0){
    
$flag 1;
    } 


Solistia 05-05-2011 05:09 PM

Still having the same problem. I even tried removing the duplicate:
if($num > 0){
$flag = 1;
}

Still having the same issue.

Kaeliah 05-05-2011 05:42 PM

Well removing the duplicate wouldn't do anything different. The error your getting has nothing to do with the username thing, it's just I used the same flag so when there's an error for either, it shows the same error. Try one last one.

PHP Code:

        $ip $_SERVER['REMOTE_ADDR']; 
        
$ip preg_replace("/[^a-zA-Z0-9@._-]/"""$ip);
        
$ip secure($ip);
 
    
$query "SELECT * FROM ".$prefix."vote_voters WHERE ip = '$ip' AND username != 'Visitor'";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result);

    if(
$num 0){
    
$flag 1;
    } 



All times are GMT -5. The time now is 09:37 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.