Inactive [ADMN/GEN] AutoGroup v1.1.1 - Manage players based on time and PayPal donations. [1.4.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by md_5, Nov 12, 2011.

  1. Offline

    Josh Harwood

    Please add that idea, also on latest RB the plugin doesn't like the mysql DB

    Using same Details as the donate-dummy.php - 100% copy paste

    Code:
    03:20:49 [SEVERE] java.sql.SQLException: Access denied for user 'AutoGroup'@'localhost' (using password: YES)
    03:20:49 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:931)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4031)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1296)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2338)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    03:20:49 [SEVERE]       at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    03:20:49 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    03:20:49 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    03:20:49 [SEVERE]       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    03:20:49 [SEVERE]       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    03:20:49 [SEVERE]       at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    03:20:49 [SEVERE]       at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    03:20:49 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:582)
    03:20:49 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:185)
    03:20:49 [SEVERE]       at com.md_5.autogroup.MYSQL.init(MYSQL.java:104)
    03:20:49 [SEVERE]       at com.md_5.autogroup.AutoGroup.onPlayerCommand(AutoGroup.java:118)
    03:20:49 [SEVERE]       at com.md_5.autogroup.AutoGroup.onCommand(AutoGroup.java:80)
    03:20:49 [SEVERE]       at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    03:20:49 [SEVERE]       at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165)
    03:20:49 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    03:20:49 [SEVERE]       at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:180)
    03:20:49 [SEVERE]       at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    03:20:49 [SEVERE]       at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
    03:20:49 [SEVERE]       at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
    03:20:49 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    03:20:49 [SEVERE]       at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    03:20:49 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    03:20:49 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    03:20:49 [SEVERE] java.sql.SQLException: Access denied for user 'AutoGroup'@'localhost' (using password: YES)
    03:20:49 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:931)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4031)
    03:20:49 [SEVERE]       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1296)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2338)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    03:20:49 [SEVERE]       at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    03:20:49 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    03:20:49 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    03:20:49 [SEVERE]       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    03:20:49 [SEVERE]       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    03:20:49 [SEVERE]       at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    03:20:49 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    03:20:49 [SEVERE]       at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    03:20:49 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:582)
    03:20:49 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:185)
    03:20:49 [SEVERE]       at com.md_5.autogroup.MYSQL.load(MYSQL.java:15)
    03:20:49 [SEVERE]       at com.md_5.autogroup.AutoGroup.onPlayerCommand(AutoGroup.java:126)
    03:20:49 [SEVERE]       at com.md_5.autogroup.AutoGroup.onCommand(AutoGroup.java:80)
    03:20:49 [SEVERE]       at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    03:20:49 [SEVERE]       at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165)
    03:20:49 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    03:20:49 [SEVERE]       at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:180)
    03:20:49 [SEVERE]       at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    03:20:49 [SEVERE]       at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    03:20:49 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
    03:20:49 [SEVERE]       at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
    03:20:49 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    03:20:49 [SEVERE]       at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    03:20:49 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    03:20:49 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    03:20:49 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'donate' in plugin AutoGroup v1.1.1
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:180)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Caused by: java.lang.NullPointerException
            at com.md_5.autogroup.AutoGroup.onPlayerCommand(AutoGroup.java:127)
            at com.md_5.autogroup.AutoGroup.onCommand(AutoGroup.java:80)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            ... 14 more
    
    
     
  2. Offline

    md_5

    @Josh Harwood
    I see the issue, I will release an update later, for now use a password with at least one letter.
     
    JOPHESTUS likes this.
  3. Offline

    Mr_H4mm3r

    Can I use this for the newest recommend build? And shall I have a Premium (A paypal linked to a credit card) account for using this??
     
  4. Offline

    md_5

    Latest rb, yes any payapl account should do.
     
    JOPHESTUS and Mr_H4mm3r like this.
  5. Offline

    Mr_H4mm3r

    That sounds great :-D
    Thanks for fast answer. Can't wait for trying this plugin IT SOUNDS Amazing :)
     
  6. Offline

    VG|Mole

    This suggestion is dellllllicious! Please please please

    And md_5, really, you really think we will believe that you do not have any PayPal account? C'mon man!
     
  7. Offline

    TheShadow777

    hey i like the idea of this plugin, but it dont work for me; it post in the chat that i become a new group but i dont move into the group // iam use PEX as permission plugin, is there the problem?
     
  8. Offline

    PAL-18

    Can this plugin handle subscription donations where a player pays a monthly fee for VIP access and if they dont pay the fee, they get removed from the VIP group automatically?
     
  9. Offline

    md_5

    Sorry for the late reply, been on holiday.
    Alright, first to TheShadow777
    command: permissions player setgroup %1$s %2$s
    Is the config node that specifies the promote command, If using pex, I assume it should be al ong the lines of:

    pex user %1$s addgroup %2$s

    Where the '%1$s' is player and '%2$s' is group.
    Double check the syntax.

    To everyone else, I am very busy with lots of things, especially Guardian, the Hawkeye / Logblock replacement but I plan to
    separate the paypal part from the time rank part and include 'subscriptions' and unlimited ranks.

    I do not have a paypal account cause of my age.
    Your thanks is really all I need :)
     
    JOPHESTUS likes this.
  10. Offline

    TheShadow777

    @md_5: many thanks for you answer, but a player on my server has write an own plugin for time based promote :)
     
  11. Offline

    Nick Hooper

    Hello,

    I have a question about the /playtime command. When a player checks their playtime it says:
    (Example)
    1. You joined the server 480 seconds ago.
    2. You must reach 86400 before you are loyal.
    3. You have played for 540 seconds in total.

    Shouldn't lines 1 & 3 be the same? They both mean the same thing you shouldn't need both of them anyways. Could you make it so we can have custom messages?
     
  12. Offline

    md_5

    No.
    Line 1) Is how long since they first logged onto the server EVER
    Line 3) Is the time they have spent on the server

    So Line 1) Counts even when they are offline
     
    JOPHESTUS likes this.
  13. Offline

    Nick Hooper

    Oh DERP.... Then how come line 1 is less then line 2?
     
  14. Offline

    md_5

    Because line 1 is only calculated when they join, line 3 is every 60 seconds
     
    JOPHESTUS likes this.
  15. Offline

    Nick Hooper

    I just looked at the playtime now and it's way more accurate than it was before. I should have waited a bit longer to see.
     
  16. Offline

    ravand

    everybody on my server (excluding admins) are beeing autodemoted to that group aswell.. even tho its higher in the ranking... is that normal?... and if not.. how can i prevent my moderators from beeing demoted to that group?
     
  17. Offline

    md_5

    give them the autogroup.norank permisison
     
    JOPHESTUS likes this.
  18. Offline

    ravand

    tyvm good sir
     
  19. Offline

    yaitsbilly

    Players on my server keep getting there time reset. Please help there are no errors in console.
     
  20. Offline

    Juze

    Thanks, I'll likely update my PIN setup for this too!
     
  21. Offline

    CBServer

    Hmmm. I pretty much have this all setup to work well with my website shop, just a question though about the Notify URL, do I HAVE to have the donate.php somewhere for the whole plugin to work because heres what I have planned.

    Someone goes onto my website shop (http://www.citi-build.com/shop) and purchases a rank which instantly upgrades them to a new rank on the website then I'm wanting it to automatically rank them on the server too, I am just wondering how I am going to go about the URL notification as when someone purchases a Rank I currently have IPN setup for (http://www.citi-build.com/shop)

    Thanks!
    p.s sorry if this doesn't make sense, 02:25 and I'm tired.
     
  22. Offline

    md_5

    Setup another ipn for donate.php
     
    JOPHESTUS likes this.
  23. Offline

    CBServer

    Paypal only allows one IPN to be used as far as I know, looks like this won't work but thanks anyway. :)
     
  24. Offline

    yaitsbilly

    My players time keep getting reset. Please help.
     
  25. Offline

    Magew

    EDIT: I don't know how I'm the only one who noticed this but in donate.php, it checks if the status is "Complete" and not "Completed". If you look below, 'payment_status' is Completed, past tense. I'm unsure if this is the issue..checking now. Didn't fix anything. I also set $receiver_email to resemble $myemail, that didn't do anything either.

    EDIT 2: I never found a proper fix, but after thoroughly reviewing the PHP code I decided to just rewrite it. I understand you're making a new one but I couldn't wait. Thanks anyways.

    I've read everything that's readily available and have yet to find luck in this plugin. I'm sure it's me though (unless some function in 1.1 R3 broke it). I'm trying to test out the whole usage of it through PayPal sandbox and I'm not having much luck. I've managed to make it send me an e-mail with information, however it says that there's an issue. I've checked the database and it has successfully created the proper tables but it hasn't added any purchases or records of donations. Below is the e-mail I received and then the settings I used when I got the e-mail. I have tried many alternatives to fix the problem, but they all produce no e-mail at all.

    When I switched $url to the sandbox url (commented), I think it gave either no e-mail at all or it gave an e-mail with no information besides that something went wrong. I checked the notification history on PayPal and it appears to be producing them, just not sending them. Is it possible PayPal changed something?


    Code:
     
    Something has gone wrong.
    The following information is provided for investigation:
     
     
    mc_gross = 15.00
     
    protection_eligibility = Partially Eligible - INR Only
     
    address_status = unconfirmed
     
    payer_id = CMZLYYBJSR9RN
     
    tax = 0.00
     
    address_street = 1 Main St
     
    payment_date = 12:33:35 Feb 01, 2012 PST
     
    payment_status = Completed
     
    charset = windows-1252
     
    address_zip = 95131
     
    first_name = John
     
    mc_fee = 0.74
     
    address_country_code = US
     
    address_name = John Margo
     
    notify_version = 3.4
     
    custom =
     
    payer_status = verified
     
    business = [email protected]
     
    address_country = United States
     
    address_city = San Jose
     
    quantity = 0
     
    verify_sign = AjkOGGXl6Y3qSBSfME2xawl8PFsRAnUheJJx0CQBuqVLOPcZeczgeV9C
     
    payer_email = [email protected]
     
    txn_id = 88Y93476WB003903P
     
    payment_type = instant
     
    last_name = Margo
     
    address_state = CA
     
    receiver_email = [email protected]
     
    payment_fee = 0.74
     
    receiver_id = AWF79UMNANT88
     
    txn_type = web_accept
     
    item_name = AuricleCraft
     
    mc_currency = USD
     
    item_number =
     
    residence_country = US
     
    test_ipn = 1
     
    transaction_subject = AuricleCraft
     
    payment_gross = 15.00
     
    ipn_track_id = a7f18edd473ae
    PHP:
    <?php
    error_reporting
    (E_ALL);
     
    //Edit these to match your configuration
    $host "s2.****";
    $username "*****";
    $password "*****";
    $database "*****";
    $table "donators";
    $table2 "players";
    $myemail "[email protected]";
    $url "ssl://www.paypal.com";
    //$url = "ssl://www.sandbox.paypal.com";
     
    /*DEBUG INFO
    $payment_status = 'Complete';
    $receiver_email = '';
    $first_name = '';
    $last_name = '';
    $payer_email = '';
    $txn_id = '';
    $payment_amount = '50';
    */
     
    // read the post from PayPal system and add 'cmd'
    $req 'cmd=_notify-validate';
     
    foreach (
    $_POST as $key => $value) {
        
    $value urlencode(stripslashes($value));
        
    $req .= "&$key=$value";
    }
     
    // post back to PayPal system to validate
    $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
    $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $header .= "Content-Length: " strlen($req) . "\r\n\r\n";
    $fp fsockopen ($url443$errno$errstr30);
     
    // assign posted variables to local variables
    $payment_status $_POST['payment_status'];
    $receiver_email $_POST['receiver_email'];
    $first_name $_POST['first_name'];
    $last_name $_POST['last_name'];
    $payer_email $_POST['payer_email'];
    $txn_id $_POST['txn_id'];
    $payment_amount $_POST['mc_gross'];
     
    if (!
    $fp) {
        
    // HTTP ERROR
    } else {
        
    fputs ($fp$header $req);
        while (!
    feof($fp)) {
            
    $res fgets ($fp1024);
            if (
    strcmp ($res"VERIFIED") == 0) {
                
    // check the payment_status is Completed
                // check that txn_id has not been previously processed
                // check that receiver_email is your Primary PayPal email
                // process payment
     
                
    if (strcmp($payment_status"Complete") != 0){
                    die(
    "Payement status not Complete");
                }
     
                if (
    strcmp($receiver_email$myemail) != 0){
                    die(
    "Invalid receiver email address!");
                }
     
                
    $con mysql_connect($host$username$password);
                if (!
    $con)
                {
                    die(
    'Could not connect: ' mysql_error());
                }
     
                
    mysql_query("CREATE DATABASE IF NOT EXISTS $database",$con);
                
    mysql_select_db($database$con);
     
                
    $sql "CREATE TABLE IF NOT EXISTS $table
                (
                first_name text,
                last_name text,
                payer_email text,
                txn_id text,
                payment_amount int,
                claimed boolean
                )"
    ;
                
    mysql_query($sql,$con);
     
                
    $sql "CREATE TABLE IF NOT EXISTS $table2
                            (
                            name text,
                            amount int
                            )"
    ;
                
    mysql_query($sql,$con);
     
     
                if(
    mysql_num_rows(mysql_query("SELECT txn_id FROM $table WHERE txn_id='$txn_id'")) != ){
                    die(
    "Transaction id $txn_id already exists in the database");
                }
                
    $sql "INSERT INTO $table VALUES
                                            (
                                            '
    $first_name',
                                            '
    $last_name',
                                            '
    $payer_email',
                                            '
    $txn_id',
                                            
    $payment_amount,
                                            0   
                                            )"
    ;
                
    mysql_query($sql,$con);
                
    mysql_close($con);
                
    mail ($myemail"AutoGroup: Donation Recieved""$first_name $last_name
                has donated 
    $payment_amount with id $txn_id");
            }
            else if (
    strcmp ($res"INVALID") == 0) {
                foreach (
    $_POST as $key => $value){
                    
    $emailtext .= $key " = " .$value ."\n\n";
                }
                
    mail ($myemail"AutoGroup: Invalid Donation Recieved""Something has gone wrong.
                The following information is provided for investigation:\n\n
    $emailtext");
            }
        }
        
    fclose ($fp);
    }
    ?>
     
  26. Offline

    Camibus

    Was wondering if there is a way to manually set times for players. Or possibly, though I've never been able to figure out how, edit the sqlite tables manually.
     
  27. Offline

    md_5

    There is a firefox addon called sqlite manager.
    Next update will have manual set
     
    JOPHESTUS likes this.
  28. Offline

    Camibus

    awesome.. thanks for quick reply
     
  29. Offline

    Camibus

    So I've been running a server for over a year now. We have a ranking system in place based off of time played. The problem is... we have to promote manually. The main problem is... we have had over 7k people join. I can't possibly manually edit everyone's playtime to use this plugin. My players are already raging.. as I have no choice but to remove timed ranks... it is just too much work for my staff to manually promote. Any ideas?
     
  30. Offline

    md_5

    autogroup.norank

    That permission will stop them getting ranked
     
    JOPHESTUS likes this.

Share This Page