MOH:SH =:LeBan:= banning tool

Discussion in 'New Files' started by LeBabouin, Oct 9, 2011.

  1. LeBabouin Papio anubis

    Contributions:
    416
    Specialties:
    Scripting
    Processing:
    Graphics:
    PREMIUM
    I Donated
    LeBan banning tool V1.0.0 Easy banning for Medal of Honor Spearhead server admins. Cut them out !

    This thing has been consuming all my free time for too long now, so I need to release it in order to get back to MoH scripting again.


    CONTENTS

    LeBan is composed of two parts:
    _ the admin ingame menu in which you select the player to ban
    _ the java tool that sends the ban commands for this player to the MoH server
    There is also an icon for making your desktop shortcut.


    PREREQUISITES

    The server you want to ban players from must be patched with Daven's patch in order to be able to use his banning system : http://www.modtheater.com/forum/showthread.php?t=37274&page=16
    The computer you run the .jar file on must have a JVM installed: http://www.java.com/fr/download/index.jsp


    INSTALL

    Paste the .pk3 menu file into your own game mainta or maintt.
    Paste the .jar file anywhere you want, preferably in a dedicated folder.


    LIMITATIONS

    Server has to run on Windows so you can enjoy Daven's patch.
    For now, LeBan is able to connect to only one MoH server. So, if you intend to survey several MoH servers at the same time, you'll have to run several instances of LeBan.
    The admin menu uses the configstringitem command to display the server player list. As you may know, the team 0 thing, 32 players max...
    The unban fonctionnality is not implemented yet but can still be used manually through the client console using the rcon commands:
    _ sv removeip xxx.xxx.xxx.xxx
    _ sv writeip
    If you run the MoH server on your computer and you want to reserve port 12203 for the MoH server, launch the MoH server first before launching LeBan, otherwise LeBan will use port 12203 (default value) and your MoH server will launch on port 12204.
    Several instances of LeBan can point on the same server, but only one player can be banned at a time.
    UI tested only under XP. I don't know how it looks under 7. That would be cool if someone with Vista / 7 could PM me a screenshot :up:


    HOW IT WORKS

    The java tool periodically checks if there is a player to ban by reading a dedicated CVAR ("ban") on the MoH server.
    The admin menu provides the current players name list. A double click on a player name will automatically fill the ban CVAR on the MoH server with the corresponding player number
    If the ban CVAR contains a player number, the java tool launches a "status" request to the MoH server and parses the response to get the player's IP and then sends the ban commands to the MoH server:
    _ sv addip xxx.xxx.xxx.xxx
    _ sv writeip
    _ clientkick #
    A game message will display "$playername has been banned"
    Secondarily, for further versions use, a MoH server CVAR ("banned") is filled with the IP and name of the banned player. Usefull to unban in case you banned a wrong player


    GET STARTED

    Launch LeBan java tool by double clicking LeBan.jar. This will pop LeBan's UI up
    Fill in the text zones with the desired parameters. Check delay shouldn't be set to less than five seconds, as the ban commands need about 2 seconds to execute. You can always try setting less delay if eveything goes well
    Start the check loop by clicking the "Start" button. From this moment, the ban fonctionality is operational. If everything is OK you will see "No ban request" in the LeBan console.
    Launch your own MOH:SH or BT game.
    First you'll maybe want to bind the menu to one of your keyboard key. I use the F4 key :
    Open your game console and type "unbind f4" and press enter key
    Type "bind f4 pushmenu LeBan" (beware to the caps letters) and press enter key. Close your console.
    Press F4 and the menu will show up
    Launch LeBan java tool by double clicking LeBan.jar. This will pop LeBan's UI up
    Fill in the text zones with the desired parameters. Check delay shouldn't be set to less than five seconds, as the ban commands need about 2 seconds to execute. You can always try setting less delay if eveything goes well
    Start the check loop by clicking the "Start" button. From this moment, the ban fonctionality is operational. If everything is OK you will see "No ban request" in the LeBan console.


    BANNING

    Enter your rconpassword in your game console. Press your F4 key. Double click on the undesirable player's name, wait till player's team turns to 0 (or disappears) in the menu list and the "...has been banned" game message raises. You can hear the rolling drum sound that will confirm your ban request has been issued. Depending on the scan frequency you set in the UI, the "...has been banned" game message can take up to 15 seconds to raise. If the player to ban leaves before the ban process is launched, he won't get banned and the "ban" CVAR will be cleared off.
    You have no right to error, so I suggest to first doing one click on the undesired playername to ensure you have selected the correct line and then doing the fatal double click.


    MISC

    You can always check the tool console to ensure everything's in order, but I set a detailed log system for help and support. You'll find the log files in the folder you pasted LeBan.jar in. This is a rolling file of 1 MB size with 5 backup files. When you need support, please PM me the file where the bug began. ATM, I can no longer experience any bug, but maybe I missed some.
    You must click the stop button and then enter the new entries in order to point to another server or change the scan delay.
    Next version should have a menu bar for customization and standard functions, but I can include your own clan logo, icon, background or font if you can't wait.


    CREDITS

    Daven for the banning commands in Daven's patch.
    Luckyboy for the connecting and command sending engine I grabbed from XSI.
    DopeDog for intensive testing, thanks so much my dear bro !




    CONTACT

    PM me here or post @ =:AnUbIs:= site


    [IMG] [IMG]
    zlatko, Daven, Creaper and 7 others like this.
  2. bballmcd7 Yes, I am Super :)

    Contributions:
    40
    Specialties:
    Scripting, Pure Gamer
    Processing:
    Graphics:
    PREMIUM
    I Donated
    nice one!
  3. Possimos Corporal

    Contributions:
    16
    Processing:
    Graphics:
    Very nice ! :)
    I cannot seem to find the pk3?
  4. Herr_Kruger Medal of Honor is not MOH

    Contributions:
    456
    Specialties:
    Mapper, Scripting, Textures, Programming, Pure Gamer
    Processing:
    Graphics:
    LeBan, magnifique! :bigrin:

    Great tool Xav, great tool, reminds me of my days as a Server admin. I could have used this one :) Contrib points very well earned. Congrats ! :beerbang:
  5. sorridstroker Armed Forces Veteran

    Contributions:
    233
    Specialties:
    Scripting
    PREMIUM
    I Donated
    Lovely tool.

    :)
  6. Elgan Captain

    Contributions:
    310
    Specialties:
    Modeler, Scripting, Programming, Pure Gamer, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    very good work :)!
  7. LeBabouin Papio anubis

    Contributions:
    416
    Specialties:
    Scripting
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Thank you guys!

    Thanks m8. Oops, I re uploaded the zip with the pk3. And the pk3 alone for you ;)
  8. RazoRapid Sergeant

    Contributions:
    29
    Specialties:
    Programming
    Processing:
    Graphics:
    It looks really really nice :)

    I don't use SH so I'm not able to test it and see how it works, but it looks very good.
  9. Daven Corporal

    Contributions:
    74
    Specialties:
    Scripting, Programming
    Processing:
    Graphics:
    very nice work! :)
  10. Herr Klugscheisser Drinking and Tanking. Perfect together.

    Contributions:
    329
    Specialties:
    Scripting, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    You sir ... are awesome!
  11. zlatko Staff Sergeant

    Contributions:
    146
    Specialties:
    Mapper, Scripting, Pure Gamer
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Bravo my friend great job, keep it works perfectly just as great:beerbang::up::icon_pray::bigrin:
  12. Thawed Corporal

    Contributions:
    30
    Specialties:
    Pure Gamer
    Processing:
    Graphics:
    That's great. nice job.
    can we ban ip ranges using this mod?
  13. LeBabouin Papio anubis

    Contributions:
    416
    Specialties:
    Scripting
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Not yet but I will add this option asap. I won't be able to work on it for a week though, due to real life work I must do at home :( But what you can do in the meantime is edit the listip.cfg in your server mainta and replace the desired range numbers by 0, for instance replace 123.123.123.123 by 123.123.0.0
  14. Thawed Corporal

    Contributions:
    30
    Specialties:
    Pure Gamer
    Processing:
    Graphics:
    Couldn't this be done via sv_addip xx.xx.0 ?
  15. LeBabouin Papio anubis

    Contributions:
    416
    Specialties:
    Scripting
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Not sure for the IP format but it is not that important, check in Daven's thread. I prefer using the standard IP format. More important is there's no underscore between sv and addip.
  16. Stelios Lance Corporal

    Contributions:
    0
    Processing:
    Graphics:
    why do not use the foresight?
  17. Stelios Lance Corporal

    Contributions:
    0
    Processing:
    Graphics:
    is the best anticheat tool
  18. loeri loeri.tk

    Contributions:
    45
    Specialties:
    Mapper, Scripting, Programming, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    cause its a jar file, u can use the on linux so other tools like foresight are only windows and u need sometimes a fix for windows 7/vista..

    Btw this is a great tool could u send me the source? I m new to java and want to try to make one or edit yours :)
  19. LeBabouin Papio anubis

    Contributions:
    416
    Specialties:
    Scripting
    Processing:
    Graphics:
    PREMIUM
    I Donated
    [IMG]

    Thanks m8!
    As Daven's patch is needed and his linux patch has not ben tested yet, there's no garanty Leban will work on linux. I have no mean to test it for now as MoH:SH linux server doesn't run on multicore :( AFAIK
    LeBan is not open source yet :bigrin: but you can start from Luckyboy's XSI sources, as I did, or try to find a good decompiler for java 6 ;)
    zlatko likes this.
  20. Herr_Kruger Medal of Honor is not MOH

    Contributions:
    456
    Specialties:
    Mapper, Scripting, Textures, Programming, Pure Gamer
    Processing:
    Graphics:
    1. dont double post 2. dont trol otheres peoples threads. 3.lol

Share This Page