Punishments Manager - Name Server Addon
I - Presentation
Hello' People, I come up with a little something for server owners. It's something that I like to call 'Punishments Manager', even if it doesn't have a real name, but eh, let's begin by explaining you what it is. This punishment manager is an unofficial addon for the Vornne's Name Server. This tool has for purpose to keep tracks of past punishments of players, and having the ban list online allowing admins to set a given amount of time for each bans. In addition, with an account system and a simple permissions editing, server owners can let their admin having access to different sections of the name server according to their permissions.
II - Features
- Web Hosted ban list
- No waiting time on unban
- Custom Ban Time (1 Hour, 3 Hours, 12 Hours, 1 Day, 3 Days, 1 Week, 2 Weeks, 3 Weeks, 1 Month)
- Every Punishment Saved
- Welcome message on join (different if the player is banned) with variables (such as player uid, unban date, player name etc..)
- Every Punishment Saved And readable at any time
- Account Permissions Managing (can give or remove access to tabs of the name server / punishments manager)
- Player Unbans Saved
III - Installation
NOTE: If you already got the name server installed, it's advised to do files & database backup before editing anything.
Vornne's Readme said:To install, you need a web server with PHP and MySQL installed; I use Linux and Apache (LAMP) so the instructions will be tailored to that. Lines starting with "$" represent commands to run in the shell prompt, and lines starting with "mysql>" represent queries to run in the mysql command line tool.
To start off, you will need to uncompress 'pwnameserver' into the web directory of your server. If you already got the name server installed, replace its folder. Make sure to set the name server as the directory you are in before connecting as root to your MySQL Server:
$ cd /var/www/pwnameserver/
$ mysql -u root -p
If you do not have the name server already installed:
mysql> CREATE DATABASE pw_player_names;
mysql> GRANT ALL PRIVILEGES ON pw_player_names.* TO 'pw_name_server'@'localhost' IDENTIFIED BY 'FX3nQGY5Hdqc';
mysql> USE pw_player_names;
mysql> SOURCE private/create_database.sql;
mysql> UPDATE warband_servers SET password = SHA1('N6XcqAXD') WHERE name = 'Server';
The last command set the connection password between your game server and the web server.
If you do have the name server installed:
mysql> USE pw_player_names;
mysql> SOURCE private/update.sql;
Now, the database tables and basic informations were created, you need to set the root user password:
mysql> UPDATE web_accounts SET passwd = SHA1('Qy7rQf9n') WHERE name = 'root';
mysql> exit;
Now the database is ready, make sure to edit the file 'private/config.php' to fit with your database informations.
Edit the constant lines (if needed) 'database_server_name', 'database_username', 'database_password', 'database_name'.
We are almost done, web side, now, connect to the name server as root (in this tutorial, username:password = root:Qy7rQf9n).
Head to the tab 'Web Settings' create a new account with your UID (you can find it in your game server logs when you join it).
Now, make sure to always use the account you just created for yourself, you should only use the root account in case you loose the 'Web Settings' permissions.
You can also create an account for each of the admins you got in your team.
Now, you'll need to set a cronjob. It'll be a script that will be triggered each X minutes and that will check if the ban time is over. If it is, then, the player is removed from the ban list and is able to join the server, else, he'll remain banned untill his ban time is over. To do this, you must ensure cURL is installer.
$ crontab -e
Go at the bottom of the file and add a line:
*/10 * * * * curl -L localhost/pwnameserver/server-requests/auto_unban.php
Save and quit. This line means the link 'localhost/pwnameserver/server-requests/auto_unban.php' will be triggered each 10 minutes. You can find more informations about cronjobs by following this link.
Last step on the webserver. Every unbans are saved in a file 'unban.log'. However, this file display IP of the admin who unbanned the player (in case the unban was not done by the cronjob). This file is stored in the folder 'private', this folder is protected by the file '.htaccess', only listed IPs in this file can access the folder via a web interface. In order to grant yourself the access, at the end of the file, add the line: 'Allow from xx.xx.xx.xx' (replace the X values by your IP).
Now, game scripts need to be edited in order to link game server & webserver. To do so, open the folder 'scripts' from the archive you downloaded and search for 'str_name_server' & 'str_name_server_password'. Make sure those four strings fit correctly with what you have set on your server (str_name_server_password correspond to the password for the server set in the database, in our tutorial, the password is 'N6XcqAXD'). Once done, you can upload the content of 'scripts' inside the folder 'PW_4.4' of your server.
You will also need to have the content of the scripts folder in your PW_4.4 module folder in your client directory in order to be able to temp ban players and have punishments recorded. Every admins using this tool will also need it. WARNING: Before handing out the scripts to someone, make sure to edit the four strings listed above with incorrect values to prevent security holes.
IV - Questions - Answers
Q. When I log ban someone, his name appears as 'NO NAME', why ?
A. It's because the player you're attempting to ban is not registered in the 'Player Names' table.
Q. What are the variables for the custom welcome / banned message ?
A. Welcome message got two different variables & banned message got six different variables:
[list type=decimal]
[*]Welcome Message:
- *name* = Display Player Name
- *uid* = Display Player UID
- *name* = Display Player Name
- *uid* = Display Player UID
- *invoker* = Display Ban Invoker
- *invoker_uid* = Display Ban Invoker UID
- *ban_date* = Display date the player got banned on
- *unban_date* = Display date the player will be unbanned on
Q. I can't get something working, please, can you help me ?
A. Sure, make sure you correctly read the installation instructions before posting your question, if you post, make sure you provide a maximum of details.
[size=14pt]Q. What's supposed to be the UID of the account I want to create ?
A. It's the Unique ID the admin got in game. Saving it has for purpose to display the name of his account in the past punishments / ban list each time this UID would punish someone. By doing so, an admin can easily be recognized if he punished someone under an 'unknown' nickname.
[size=18pt]V - Download
Punishments_Manager.rar
MD5: c3024b9efecef3c65a04f52b90a95c05
MD5: c3024b9efecef3c65a04f52b90a95c05
Punishments Manager - Name Server/
├── pwnameserver
│ ├── admin_permissions.php
│ ├── ban_list.php
│ ├── checkplayer.php
│ ├── index.php
│ ├── log_ban.php
│ ├── log_in.php
│ ├── main.css
│ ├── player_names.php
│ ├── private
│ │ ├── config.php
│ │ ├── create_database.sql
│ │ ├── unban.log
│ │ └── update.sql
│ ├── punishments.php
│ ├── server-requests
│ │ ├── auto_unban.php
│ │ ├── ban-player.php
│ │ └── check-ban.php
│ ├── servers.php
│ └── web_settings.php
├── README.txt
└── scripts
├── build_module.py
├── compile_shaders.py
├── dump_crafting_recipes.py
├── generate_stockpiles_from_items.py
├── header_animations.py
├── header_common.py
├── header_debug.py
├── header_dialogs.py
├── header_factions.py
├── header_game_menus.py
├── header_ground_types.py
├── header_item_modifiers.py
├── header_items.py
├── header_lazy_evaluation.py
├── header_map_icons.py
├── header_meshes.py
├── header_mission_templates.py
├── header_mission_types.py
├── header_music.py
├── header_operations.py
├── header_particle_systems.py
├── header_parties.py
├── header_postfx.py
├── header_presentations.py
├── header_quests.py
├── header_scene_props.py
├── header_scenes.py
├── header_skills.py
├── header_skins.py
├── header_sounds.py
├── header_strings.py
├── header_tableau_materials.py
├── header_terrain_types.py
├── header_triggers.py
├── header_troops.py
├── LICENSE_explanation.txt
├── LICENSE.txt
├── module_animations.py
├── module_constants.py
├── module_dialogs.py
├── module_factions.py
├── module_flora_kinds.py
├── module_game_menus.py
├── module_generated_scripts.py
├── module_generated_strings.py
├── module_ground_specs.py
├── module_info_pages.py
├── module_info.py
├── module_items.py
├── module_map_icons.py
├── module_meshes.py
├── module_mission_templates.py
├── module_music.py
├── module_particle_systems.py
├── module_parties.py
├── module_party_templates.py
├── module_postfx.py
├── module_presentations.py
├── module_quests.py
├── module_scene_props.py
├── module_scenes.py
├── module_scripts.py
├── module_simple_triggers.py
├── module_skills.py
├── module_skins.py
├── module_skyboxes.py
├── module_sounds.py
├── module_strings.py
├── module_tableau_materials.py
├── module_triggers.py
├── module_troops.py
├── Output
│ ├── actions.txt
│ ├── conversation.txt
│ ├── dialog_states.txt
│ ├── factions.txt
│ ├── info_pages.txt
│ ├── item_kinds1.txt
│ ├── map_icons.txt
│ ├── menus.txt
│ ├── meshes.txt
│ ├── mission_templates.txt
│ ├── music.txt
│ ├── particle_systems.txt
│ ├── parties.txt
│ ├── party_templates.txt
│ ├── postfx.txt
│ ├── presentations.txt
│ ├── quests.txt
│ ├── quick_strings.txt
│ ├── scene_props.txt
│ ├── scenes.txt
│ ├── scripts.txt
│ ├── simple_triggers.txt
│ ├── skills.txt
│ ├── skins.txt
│ ├── sounds.txt
│ ├── strings.txt
│ ├── tableau_materials.txt
│ ├── triggers.txt
│ ├── troops.txt
│ └── variables.txt
├── print_opcode_name.py
├── process_animations.py
├── process_common.py
├── process_dialogs.py
├── process_factions.py
├── process_game_menus.py
├── process_info_pages.py
├── process_items.py
├── process_map_icons.py
├── process_meshes.py
├── process_mission_templates.py
├── process_music.py
├── process_operations.py
├── process_particle_systems.py
├── process_parties.py
├── process_party_templates.py
├── process_postfx.py
├── process_presentations.py
├── process_quests.py
├── process_scene_props.py
├── process_scenes.py
├── process_scripts.py
├── process_simple_triggers.py
├── process_skills.py
├── process_skins.py
├── process_sounds.py
├── process_strings.py
├── process_tableau_materials.py
├── process_triggers.py
├── process_troops.py
├── README.txt
├── STYLE.txt
└── variables.txt
5 directories, 153 files
├── pwnameserver
│ ├── admin_permissions.php
│ ├── ban_list.php
│ ├── checkplayer.php
│ ├── index.php
│ ├── log_ban.php
│ ├── log_in.php
│ ├── main.css
│ ├── player_names.php
│ ├── private
│ │ ├── config.php
│ │ ├── create_database.sql
│ │ ├── unban.log
│ │ └── update.sql
│ ├── punishments.php
│ ├── server-requests
│ │ ├── auto_unban.php
│ │ ├── ban-player.php
│ │ └── check-ban.php
│ ├── servers.php
│ └── web_settings.php
├── README.txt
└── scripts
├── build_module.py
├── compile_shaders.py
├── dump_crafting_recipes.py
├── generate_stockpiles_from_items.py
├── header_animations.py
├── header_common.py
├── header_debug.py
├── header_dialogs.py
├── header_factions.py
├── header_game_menus.py
├── header_ground_types.py
├── header_item_modifiers.py
├── header_items.py
├── header_lazy_evaluation.py
├── header_map_icons.py
├── header_meshes.py
├── header_mission_templates.py
├── header_mission_types.py
├── header_music.py
├── header_operations.py
├── header_particle_systems.py
├── header_parties.py
├── header_postfx.py
├── header_presentations.py
├── header_quests.py
├── header_scene_props.py
├── header_scenes.py
├── header_skills.py
├── header_skins.py
├── header_sounds.py
├── header_strings.py
├── header_tableau_materials.py
├── header_terrain_types.py
├── header_triggers.py
├── header_troops.py
├── LICENSE_explanation.txt
├── LICENSE.txt
├── module_animations.py
├── module_constants.py
├── module_dialogs.py
├── module_factions.py
├── module_flora_kinds.py
├── module_game_menus.py
├── module_generated_scripts.py
├── module_generated_strings.py
├── module_ground_specs.py
├── module_info_pages.py
├── module_info.py
├── module_items.py
├── module_map_icons.py
├── module_meshes.py
├── module_mission_templates.py
├── module_music.py
├── module_particle_systems.py
├── module_parties.py
├── module_party_templates.py
├── module_postfx.py
├── module_presentations.py
├── module_quests.py
├── module_scene_props.py
├── module_scenes.py
├── module_scripts.py
├── module_simple_triggers.py
├── module_skills.py
├── module_skins.py
├── module_skyboxes.py
├── module_sounds.py
├── module_strings.py
├── module_tableau_materials.py
├── module_triggers.py
├── module_troops.py
├── Output
│ ├── actions.txt
│ ├── conversation.txt
│ ├── dialog_states.txt
│ ├── factions.txt
│ ├── info_pages.txt
│ ├── item_kinds1.txt
│ ├── map_icons.txt
│ ├── menus.txt
│ ├── meshes.txt
│ ├── mission_templates.txt
│ ├── music.txt
│ ├── particle_systems.txt
│ ├── parties.txt
│ ├── party_templates.txt
│ ├── postfx.txt
│ ├── presentations.txt
│ ├── quests.txt
│ ├── quick_strings.txt
│ ├── scene_props.txt
│ ├── scenes.txt
│ ├── scripts.txt
│ ├── simple_triggers.txt
│ ├── skills.txt
│ ├── skins.txt
│ ├── sounds.txt
│ ├── strings.txt
│ ├── tableau_materials.txt
│ ├── triggers.txt
│ ├── troops.txt
│ └── variables.txt
├── print_opcode_name.py
├── process_animations.py
├── process_common.py
├── process_dialogs.py
├── process_factions.py
├── process_game_menus.py
├── process_info_pages.py
├── process_items.py
├── process_map_icons.py
├── process_meshes.py
├── process_mission_templates.py
├── process_music.py
├── process_operations.py
├── process_particle_systems.py
├── process_parties.py
├── process_party_templates.py
├── process_postfx.py
├── process_presentations.py
├── process_quests.py
├── process_scene_props.py
├── process_scenes.py
├── process_scripts.py
├── process_simple_triggers.py
├── process_skills.py
├── process_skins.py
├── process_sounds.py
├── process_strings.py
├── process_tableau_materials.py
├── process_triggers.py
├── process_troops.py
├── README.txt
├── STYLE.txt
└── variables.txt
5 directories, 153 files
VI - Credits
Vornne, first, for having made Persistent World wich is an excellent module that still after ages from its release is still played and quite popular. But mainly, I would like to thank you for all the help you provided me on TaleWorlds and all the help you provide to people. Without you, and you module, I for sure wouldn't have gone far, so, thank you, a lot.
Wolfstar, couple with Vornne were the best teachers I could have. You learnt me a lot in SQL and PHP and I'm really glad I know someone like you. I wish you good luck for your projects.