Thread: Hammer - Banning System

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Hammer - Banning System 
    Community Veteran

    Cascade's Avatar
    Join Date
    Oct 2006
    Posts
    1,023
    Thanks given
    12
    Thanks received
    27
    Rep Power
    912
    This is the first project I've done in a long time, I started it around 45 minutes ago and already I've come up with a decent base for the project that I will explain as this thread goes along.

    So what actually is it? Well simply it just allows for server owners to protect their servers by banning individuals.

    You may say "we've had banning for years" and yes that's true, but the banning system I am proposing to create would allow one server owner to ban the user and for them to be banned across EVERY server that is using the banning system.

    The advantages of using this type of banning system:
    • Can stop hackers or glitchers from attacking multiple servers
    • User only needs to be banned once
    • Prevents damage to the econemy (bug abusers, dupes etc)
    • Makes your server more enjoyable


    Okay so now, the disadvantages:
    • It could be open to abuse by people who would ban every IP for example, causing distress.


    To prevent this disadvantage and make the system as effective as possible I have made the decision that each server will have it's own API key, all ban actions are logged and abuse will have their API key disabled and never reinstated.

    Also any disruption because of somebody using their API key in the wrong way is easily reversible due to the fact that each ban is associated with the API key and all bans can be quickly removed.

    When to use?
    You would only use the banning system for very serious offences, hacking, glitching etc for any other offence you should use your own server banning system.

    How would it be used?
    Just a simple Java file added to your server sources and one line of code added to where connections are accepted and it works straight out of the box.

    If you wish to try the banning system out, please PM me for an API key, please note they will be given to people whom I trust during the beta period and if API keys are released to the public they will be banned.

    So the file that you would add, would be this:

    Code:
    
    /*
     * To change this template, choose Tools | Templates and open the template in
     * the editor.
     */
    package com.nathanroys.thehammer;
    
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.URL;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    
    /**
     *
     * @author Nathan Roys
     */
    public class Hammer {
    
        private static final String API_LOC = "http://www.google.com/hammer/api.php";
        private static final String API_KEY = "";
    
        /**
         * GTFO YOU NO INSTANSIATE ME
         */
        private Hammer() {
        }
    
        public static boolean isBanned(String ip) {
            try {
                String response = getResponse("action=check&ip=" + ip);
                return Boolean.parseBoolean(response);
            } catch (IOException ex) {
                Logger.getLogger(Hammer.class.getName()).log(Level.SEVERE, null, ex);
                return false;
            }
        }
    
        public static boolean ban(String ip) {
            try {
                String response = getResponse("action=add&ip=" + ip);
                return response.equals("success");
            } catch (IOException ex) {
                Logger.getLogger(Hammer.class.getName()).log(Level.SEVERE, null, ex);
                return false;
            }
        }
    
        private static String getResponse(String arguments) throws IOException {
            BufferedReader br = new BufferedReader(new InputStreamReader(
                    new URL(API_LOC + "?api_key=" + API_KEY + "&" + arguments).openStream()));
            StringBuilder sb = new StringBuilder();
            String s;
            while ((s = br.readLine()) != null) {
                sb.append(s);
            }
            br.close();
            return sb.toString();
        }
    }
    Simple enough?

    And the changelog:

    18/02/2012 Project created
    18/02/2012 Checking for bans finished
    18/02/2012 Adding bans finished
    18/02/2012 Api finished, with some bugfixes etc
    18/02/2012 Started java backend
    18/02/2012 Finished java backend
    Thanks for reading..
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member
    Join Date
    Nov 2011
    Posts
    58
    Thanks given
    3
    Thanks received
    25
    Rep Power
    36
    EDIT: didnt read
    Reply With Quote  
     

  4. #3  
    Community Veteran

    Cascade's Avatar
    Join Date
    Oct 2006
    Posts
    1,023
    Thanks given
    12
    Thanks received
    27
    Rep Power
    912
    Quote Originally Posted by anArray = new int[10] View Post
    This could be abused like crazy... Example:

    Two guys develop a server, one guy ends up selling and banning the other guy = he's banned from multiple servers...
    Hence right now only trusted people are to use it, as it's like pre-alpha.
    Reply With Quote  
     

  5. #4  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,881
    Thanks given
    1,854
    Thanks received
    4,741
    Rep Power
    5000
    I'm globally banned on minecraft and therefore do not approve this project, I don't want this to happen to rsps aswell



    Reply With Quote  
     

  6. Thankful users:


  7. #5  
    Community Veteran

    Cascade's Avatar
    Join Date
    Oct 2006
    Posts
    1,023
    Thanks given
    12
    Thanks received
    27
    Rep Power
    912
    Quote Originally Posted by S Quare Quxx View Post
    I'm globally banned on minecraft and therefore do not approve this project, I don't want this to happen to rsps aswell
    What did you do?
    Reply With Quote  
     

  8. #6  
    MOD DESIGNER RM MORE COMING


    TheeRash's Avatar
    Join Date
    Dec 2010
    Age
    28
    Posts
    5,129
    Thanks given
    639
    Thanks received
    2,123
    Discord
    View profile
    Rep Power
    5000
    A better option would be a flagging system.

    Certain Ips are flagged and when they login to a server the owner is notified of the reason+account info?


    Feel free to message me with any questions you may have - any offers of work will not be considered unless details are in the subject.
    Reply With Quote  
     

  9. #7  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by Cascade View Post
    What did you do?
    nothing just me and cube joined some minecraft server and cube told them he didnt like it so we were both getting "globally banned from all of minecraft"

    [Only registered and activated users can see links. ]



    Reply With Quote  
     

  10. #8  
    Community Veteran

    Cascade's Avatar
    Join Date
    Oct 2006
    Posts
    1,023
    Thanks given
    12
    Thanks received
    27
    Rep Power
    912
    Quote Originally Posted by Scu11 View Post
    nothing just me and cube joined some minecraft server and cube told them he didnt like it so we were both getting "globally banned from all of minecraft"
    Well there would have to be something in place for such an eventuality, an appeal process would probably be the best way, but obviously not appealing to the person that banned you.

    As I said, it's young at the moment, lots to work on.
    Reply With Quote  
     

  11. #9  
    Registered Member

    Join Date
    May 2009
    Posts
    1,443
    Thanks given
    653
    Thanks received
    526
    Rep Power
    310
    I would say to only hand this out to the biggest and trusted servers.
    Retired from RSPS development 2008-2018
    Reply With Quote  
     

  12. #10  
    Registered Member
    MarijuanaScape's Avatar
    Join Date
    Aug 2011
    Posts
    129
    Thanks given
    91
    Thanks received
    23
    Rep Power
    77
    Quote Originally Posted by Scu11 View Post
    nothing just me and cube joined some minecraft server and cube told them he didnt like it so we were both getting "globally banned from all of minecraft"
    mcbans doesn't work like that you're supposed to use local bans unless it was something major then step it up to global if its global you lose a bit of reputation it starts at 10 once it hits 0 you get globally banned if someone decides to randomly global ban someone they can go onto the mcbans website and dispute the global ban if the person who global banned you doesn't have the proof to justify a global ban you win the dispute and they lose a bit of rep

    OT: i think its a decent idea if i were you i would look at how mcbans set up their system
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. IP banning system 1.0.1v
    By lukas265 in forum Snippets
    Replies: 14
    Last Post: 08-14-2011, 10:33 PM
  2. Trey's 525 Banning system
    By lolpl0xme in forum Tutorials
    Replies: 9
    Last Post: 06-04-2011, 05:04 PM
  3. 525 Banning system?
    By lolpl0xme in forum Help
    Replies: 4
    Last Post: 03-23-2011, 02:38 PM
  4. Decent Banning System
    By Daniel in forum Tutorials
    Replies: 9
    Last Post: 09-20-2008, 10:54 AM
  5. TgProtect banning system
    By Cascade in forum Tutorials
    Replies: 15
    Last Post: 05-31-2008, 08:02 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •