[ADMN] Fishbans Player Info

Discussion in 'Archived: Plugin Requests' started by Shadow771, Jun 16, 2012.

  1. Offline

    Shadow771

    Hey there, I'm wondering if anyone would be able to make a plugin using the http://fishbans.com/index.php plugin API. This would be very useful for catching possible troublemakers or hackers before they have a chance to do damage. This plugin would work in two ways: one in the form of a message that pops up when a player joins, informing you of previous bans; and two, a command that can look up previous bans and provide more detail than the pop-up messages.​
    Commands:​
    /fishbans inspect (player) - Inspects the player specified for previous bans, and displays them if they have any.​
    /fishbans ignore (player) - Stops the pop-up messages on join for the specified player.​
    /fb inspect (player) - Shorter alias​
    /fb ignore (player) - Shorter alias

    Permissions:
    fishbans.inspect - Allows the player to inspect other players.
    fishbans.popups - Allows the player to see join pop-ups.
    fishbans.setignore - Allows the player to set an ignored player.
    fishbans.ignore - Auto-ignores this player.

    Possible pop-up message format:
    Steve has joined the game!
    [Fishbans] Steve has 3 previous bans: mcbans (1), mcblockit (1), mcbouncer (1)!
    [Fishbans] Type /fishbans for more information!

    Possible inspect message format:
    [Fishbans] Steve has 3 previous bans: mcbans (1), mcblockit (1), mcbouncer (1)!
    [Fishbans] mcbans: Banned from mc.example.com
    [Fishbans] Reason: Griefing!
    [Fishbans] mcblockit: Banned from mc.example.com
    [Fishbans] Reason: Griefing!
    [Fishbans] mcbouncer: Banned from mc.example.com
    [Fishbans] Reason: Griefing!

    If anyone could do this, that would be awesome! Thanks for reading.
     
  2. Offline

    Royal_Soda

    Fishfish0001 appears to have plans to pursue a plugin similar to this very soon. Perhaps you should speak with him, and ask when he plans on having a release for it.
     
  3. Offline

    Fishfish0001

    Hi Royal_Soda and Shadow771. I did have plans to make a plugin, but I don't have the time or experience right now to make one, so I was letting other community members make them.

    I know Superkabii is working on one, and edocsyl made one though. :)
     
  4. Offline

    Shadow771

    Alright, thanks for the posts guys. It seems edocsyl's plugin isn't quite fully featured, so I'll keep an eye on that and look for the one by Superkabii.
     
  5. Offline

    Deathmarine

    I'm adding this into Ultrabans, and making a simple plugin right now. I now hate JSONObjects more than ever. It is a Map but not a Map at the same time and you can't cast Map to it. I'm putting it on bukkitDev as well. This took a little bit of thought. I just hope Fishfish0001 doesn't change up the JSON structure.

    Source:
    https://github.com/deathmarine/FishChecker

    Downloads:
    https://github.com/downloads/deathmarine/FishChecker/FishChecker.jar


    Check bukkitDev page for updates.

    http://dev.bukkit.org/server-mods/fishchecker/

    Commands:
    /fishcheck {player}
    checks a players bans
    node: fishcheck.command

    Permissions:
    fishcheck.override
    Allows Players to Override the Login check.
    fishcheck.messages
    Allows Players to Receive the Login check.
    fishcheck.command
    Allows Players to use the /fishcheck command.

    BTW: Fishfish0001 It also sends the website a referrer property for the server's ip that's preforming the check.

    Edit: Nah changed my mind about adding it to Ultrabans but coupled together works just fine.
    Its a bit simpler then the requested but does pretty much all the same functions.
     
  6. Offline

    Fishfish0001

    JSON structure isn't changing anytime soon. There might be new variables added to some things, but that structure isn't changing.

    If there were to be a major change a new API would be released.

    Edit: Deathmarine: Using your plugin on my server atm :)

    Double Edit: Plugin isn't working correctly. Doesnt handle PEX permissions, doesn't check /stats/ for ban numbers, as /bans/ leaves off two services that have no reliable API, and there are some coloration issues according to my admins, cannot confirm this though.

    (Color issue:)
    <14:58:18> "Skuzze": mcblockit is in green
    <14:58:21> "Skuzze": mcbans in red
    <14:58:28> "Skuzze": mcbouncer white
     
  7. Offline

    Deathmarine

    @Fishfish0001
    Yah the color bit was just a quick deal. I've got to refine it abit. The idea was if there were no records it would show green. I dunno where the white is coming from.

    As for the API ALOT of players aren't loaded to the database on the site. And I'm not quite sure how your server pulls records from the other services but if it doesn't check on the standard check then the info isn't live, so you pretty much have to /force/ every player. Considering running another thread after the original check is pointless. As for /stats/ would be unneeded if you could add all the services to /bans/, the info would already be there and there would only be one check "Hint, Hint".

    As for permissions. Yah I forgot to take out the player.isOp() with the permissions check when I finished testing So you kinda have to be op and have the permission. But its wierd I have pex and haven't had a problem with it. I'll scrub through. I'm not completely finished with it.

    Its cool thansks for the debug info. I'm going to fix it up a bit. :)
     
  8. Offline

    Fishfish0001

    Minebans and BCBans have no publicly accessible API that I am aware of for getting ban data, so that isn't possible unfortunately. /force/ is going to be needed as the site just launched, and until more servers begin using these plugins, it will only have a few players in it. We've gotten around 250 new players today, which is a good start. /force/ usually takes anywhere from 3 to 5 seconds to get and cache the data, and once it is cached, even if you continue to use /force/ it will only draw the cached data, so only the first login should be slow.

    If you don't use /force/, the data will till be added to the database, it will just be added when the cache updater runs (every 15 minutes).
     
  9. Offline

    Deathmarine

    Why not just add them in with baninfo "[]"? Even though they have no pull from the service site just set for null to be null.
    example:
    Code:
    {
        "bans": {
            "username": "Fishfish0001",
            "service": {
                "mcbans": {
                    "bans": 0,
                    "ban_info": [
                 
                    ]
                },
                "mcbouncer": {
                    "bans": 0,
                    "ban_info": [
                 
                    ]
                },
                "mcblockit": {
                    "bans": 0,
                    "ban_info": [
                 
                    ]
                },
                "minebans": {
                    "bans": 0,
                    "ban_info": [
                 
                    ]
                },
                "bcbans": {
                    "bans": 0,
                    "ban_info": [
                 
                    ]
                }
         
            }
        }
    }
    
    You wouldn't have to have /stats/ and you GET all the information in the first check. Was what I was wondering. I don't want to screw over other developers. But the /stats/ page I would never use if this was implemented.
    Edit: And besides if they do develop an api then implementing the function wouldn't be to hard.
    Win. :)
     
  10. Offline

    Deathmarine

  11. Offline

    Fishfish0001

  12. Offline

    Deathmarine

    Sweet. Like I said on IRC, if you need help with your stat plugin I'd be more than happy to help.
     

Share This Page