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
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:
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.
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
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.
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
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