Jguy 215 Posted February 6, 2015 Greetings all, Today, I am introducing a project I've been envisioning and working on for a couple of months that is finally in a usable and sharing state where multiple people could potentially contribute to the project. Introducing HAT! What is HAT?! HAT, or Hercules Admin Tool, is an administration tool for your RO server running the Hercules emulator. It is coded in PHP and Javascript and uses backends of CodeIgniter and Twitter Bootstrap to present information in a secure and meaningful way. Written by a server owner for a server owner. It is completely Open Source and hosted on Github, released under the Apache license. Another Control Panel? Too many! Stop making these damn things! Yes, another one. However, this one is different. A lot of Control Panels today are written as a CMS for your users as well as administration for your GM's. HAT is not designed to be accessed by your users, similar to the PHPMyAdmin tool. Your users will never know its there, therefore already enhancing security. However, contrary to PHPMyAdmin, you can more deeply control what your GM's have access to. Oooh, control? I'm a control freak, tell me more! HAT has a separate database of users for your GM's that have access to your panel. You're not relying on the login table of your server and their group level to provide access. Instead, a separate user database allows access, with a fully customisable set of permission settings on what those GM's can do and not do. 98 different permission sets are possible. So, you can have an in-game support GM with some limited powers in game, and they don't have to have access to your admin panel. Likewise, you can have a developer who only needs access to some server functions and your item/mob DB's without access to your server's accounts. What other features does it have? HAT gives you the ability to administrate just about everything on your Hercules server or its databases. It's a backend tool designed to be installed to the same server as your running Hercules server, giving you error tracking, server restarting and GM commands through a web interface without needing to login to SSH. With its fully responsive interface, its suitable for access via mobile, tablet or desktop without comprising access to information you need. So far, a somewhat complete list of the features already done: Account Management including: Changing account name, email, reset passwords/PINs, manage bans, account notes, account flags, manage account storage Character Management including: Change character name, stats, levels, jobs, items, flags Guild Management including: Change guild name, leader Server Management including: Viewing server console logs, start/stop/restart running Hercules server, reload item/mob db's, scripts and battleconf, viewing server performance data Admin Management including: Add/disable/delete GM's, assign/delete/change permission sets (groups) More features being added almost every week! How can I use it? Note that the panel is still in constant development and could be unstable. We would appreciate more testers and bug reports regarding the panel. While I try to write and test code that I know will work before pushing it to Github, sometimes I miss something or it doesn't work as expected in another environment. If you're willing to contribute by using and reporting bugs, you can find the panel to download here: https://github.com/jguy1987/HercAdminTool I found a bug! How do I report it to you?! You can use the Github issue tracker to report bugs: https://github.com/jguy1987/HercAdminTool/issues I want XYZ feature! Can you make it? Maybe. Use the Gitbhub issue tracker to give me the suggestion and I'll see if I can/want to add it: https://github.com/jguy1987/HercAdminTool/issues You lied! My panel completely destroyed my server! Take backups. As mentioned above, you're using something that is constantly in development. If you encounter a bug, please report it. If you encounter an issue that leads to the destruction of data, this is a beta product, and I'm sorry, but I cannot and will not be held responsible. What are the system and server requirements for running the HAT?! The following system I run my testing on, let me know if you have similar results with a system with different packages or such: * Linux, specifically Ubuntu 14.04. Windows or BSD at this moment is completely untested. I plan on hopefully testing this weekend. * apache2, version 3.4.7 * php5, version 5.5.9 * php5-mcrypt needs to be installed and enabled. You can do such by adding to your php.ini: `extension=mcrypt.so`. * php5-mysql extension. MySQL can be installed on a different machine if you so desire but you must have the php5 extension installed on the machine * apache needs to be configured to include the mod_rewrite extension. In addition, your per directory settings for apache configuration must allow "follow symlinks" and "AllowOverride all". * You can optimize Apache to use a bit less memory so that your Hercules server can expand if you do not anticipate many people using your panel by taking the following steps: - Install apache2-mpm-prefork. - Reduce the amount of clients your apache can serve and reduce the amount of servers it starts up in httpd.conf/apache2.conf. So.... Github: https://github.com/jguy1987/HercAdminTool IRC: irc.rizon.net @ #hercadmintool - if you want to talk to me about it or submit features or poke me to do more work. Demo available at: http://hatdemo.jemstuff.com The demo can be access with username/password: admin/admin. You can do most things in the demo so feel free to play around. I know there's not much data there to experiment with, but feel free to play. 18 milk, Yoh Asakura, Hyoru and 15 others reacted to this Quote Share this post Link to post Share on other sites
Mystery 594 Posted February 6, 2015 Finally you posted it :> Now everyone knows <3! Quote Share this post Link to post Share on other sites
Jguy 215 Posted February 6, 2015 FYI - I've established a development blog of sorts for the Control Panel. You can find it here: http://herc.ws/board/blog/30-a-life-in-the-hat/ Quote Share this post Link to post Share on other sites
Nameless2you 97 Posted February 6, 2015 Yay~ : ) Quote Share this post Link to post Share on other sites
Skyline 23 Posted February 6, 2015 This looks great! Quote Share this post Link to post Share on other sites
Emistry 145 Posted February 6, 2015 this is great =) how about adding feature like sending @commands from HAT to ingame ?? or sending linux commnad to server like putty ?? Quote Share this post Link to post Share on other sites
Jguy 215 Posted February 6, 2015 this is great =) how about adding feature like sending @commands from HAT to ingame ?? or sending linux commnad to server like putty ?? Hi Emistry! This was already on my list. I'm not certain how I want to do it though. So far I think I have two options on what I can do/how I want to do it: * If the Control Panel can start/stop your server (which I hope it can), I can force the CP to start the map-server in a screen of my choosing and then I can send command with the Hercules Console Input . However, this (I believe) would require you to install the panel ON the server running Hercules. Obviously this would also allow me to pass commands to the running server via an SSH socket, such as apt-get update / yum update and such. But! The caveat is that the user would have to install apache/php/php5-mysql on the server running Hercules. While a few people accessing the Tool on a non-constant basis wouldn't require a huge amount of server resources (I think on my tests while I'm actively doing stuff my apache uses around 30MB of RAM, maybe less) it's still requiring those server resources. What I have going for me in this scenario is that Ind has been wonderful in reducing the amount of memory Hercules takes therefore making this somewhat possible. * Alternatively, I've already put together a hidden NPC that I could use to pass @/# commands to in-game. Store them in a SQL table and then have the NPC poll the table every few minutes for a new command. The issue with this is if you wanted to pass a command to an online player and you issue the command through the CP and that player logs off before the command is executed, the command will fail, and I do not believe the atcommand and charcommand script commands have a way to communicate back to anything that they failed. EDIT: A solution to the second point I suppose is check to see if the character is online when the command is supposed to be ran. Not online? Sends a query back to the table that states the command has/will fail because the character in question is offline. In this way I can also make the CP save commands for when the player IS online, but then I'd have to have the NPC poll the table close to every minute, not sure how much lag that might cause. 2 karazu and jaBote reacted to this Quote Share this post Link to post Share on other sites
Roberto 5 Posted February 7, 2015 WTF Jman, I'd dreamed with this same idea in this week!!! So cool. Suggestion: Is possible show players only over autotrade? You can separate the "real players" for a real value and show a value for only using autotrade in game. Quote Share this post Link to post Share on other sites
Jguy 215 Posted February 7, 2015 WTF Jman, I'd dreamed with this same idea in this week!!! So cool. Suggestion: Is possible show players only over autotrade? You can separate the "real players" for a real value and show a value for only using autotrade in game. This shouldn't be a problem at all. Quote Share this post Link to post Share on other sites
Jguy 215 Posted February 10, 2015 Updates: The entire account module should function correctly now. The account interface is divided into 6 tabs. All the data is loaded on page load so if you need to switch back and forth between tabs, the data doesn't need to reload. Obviously you could F5 the page to reload the data. I'll go over what tabs are available and what you can do in each. Tab 1 - Basic Info Here you can view the basic details about an account. Stuff like the account name, birthdate, creation date, last login information, and a quick look at ban information Tab 2 - Account Blocks Here, a history of the blocks an account has had appear. It will be recommended that you do not give your GM's access to the @ban/@unban command in game, because that ban would not show up here as history. In this screen you can add a new block or delete any block that is still valid. You can either place a permanent ban, which changes the account state field to "5", or a temporary ban ending at a certain date/time. Some preset reasons are in there and a comments field to add your own comments. I will be adding a way for you to add your own reasons but for now, they're hard coded. Here's a screenshot: Tab 3 - Notes Here, you can leave notes about an account. Pretty simple. Notes will appear as newest -> oldest. No screenshot, the screen is pretty simple. Tab 4 - Register DB Here, you can (right now) view the entries for the account in the acc_reg_num_db and acc_reg_string_db (coming soon) tables. In the near future, there will be a way for you to edit, add or delete the entries in this screen. Tab 5 - History All of the changes to an account will be logged. If you change the email, gender, group or other, it will be logged to a separate table. On this screen, you can view what was changed, and it's old and new value, who did it and when. For obvious reasons, nothing will be editable here. Here's a screenshot: Tab 6 - Characters Here is pretty simple. List of the characters on the account. The CharID is a link to the character page where you can do the same page. That page just isn't laid out correctly nor does it work. There is a spot for "Options" on the table, here you will be able to reset the character position with one click or possibly kick the character from the server. Some future thoughts about this details page: I'll need to include a tab for the account storage. I also need to include a place where the admin can reset the pincode or password, which will send a new random password/pincode to the user. This will be coming in a near future update. I'd love to hear your thoughts or suggestions if I've missed something. Right now the branch is merged back into master but master is not usable because the sql updates have not been completed. This will be coming very very soon. 3 Senos, JulioCF and Emistry reacted to this Quote Share this post Link to post Share on other sites
Shatowolf 9 Posted February 11, 2015 Awesome!! thanks man. Quote Share this post Link to post Share on other sites
saithis 0 Posted February 13, 2015 May I suggest you take a look at https://getcomposer.org/, that way you won't ever need your application/third_party folder. composer is a dependency manager for PHP and does its job really really well. I've worked on several projects with it and never regretted it. Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted February 13, 2015 (edited) Awesome Job! My suggestion is to add last_mac detail You can add an optional text field on what table or column of last_mac in db, then display the data, based on account ID. Very useful for harmony & hashield users also, dont forget to include char_reg_num_db maybe in character section/tab. (editable) Edited February 13, 2015 by Hadeszeus Quote Share this post Link to post Share on other sites
Jguy 215 Posted February 22, 2015 Awesome Job! My suggestion is to add last_mac detail You can add an optional text field on what table or column of last_mac in db, then display the data, based on account ID. Very useful for harmony & hashield users also, dont forget to include char_reg_num_db maybe in character section/tab. (editable) Hi there! Thanks for your suggestion. I'm not a harmony user. Can you let me know where in the database the last_mac goes when you utilize Harmony? In the loginlog table or into it's own table? Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted February 23, 2015 Awesome Job! My suggestion is to add last_mac detail You can add an optional text field on what table or column of last_mac in db, then display the data, based on account ID. Very useful for harmony & hashield users also, dont forget to include char_reg_num_db maybe in character section/tab. (editable) Hi there! Thanks for your suggestion. I'm not a harmony user. Can you let me know where in the database the last_mac goes when you utilize Harmony? In the loginlog table or into it's own table? Me either. Im not using harmony but using sso login can save IP on last_mac column under login table. Quote Share this post Link to post Share on other sites
vBrenth 39 Posted March 3, 2015 poke too regarding the last_mac Quote Share this post Link to post Share on other sites
Jguy 215 Posted March 3, 2015 Added the functionality in this commit: https://github.com/jguy1987/HercAdminTool/commit/d0244437a1baa706134b9a21bfbee7baf67a8626 Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted March 4, 2015 Thank you so much for working on this project. Quote Share this post Link to post Share on other sites
neil413 0 Posted March 6, 2015 AWESOME O.O i hope i can test this out i want to learn how to use this ) Quote Share this post Link to post Share on other sites
Jguy 215 Posted March 10, 2015 Hi folks, https://github.com/jguy1987/HercAdminTool/commit/b232298ac0b0c889a3dbc54386cd80a71fa8db12 Multiple what's it's now?!???!?!???! This update adds the ability for the HercAdminTool to be able to administrate multiple char/map databases with one login database. At the top right of the page, next to your username, you will find a server selection box. Dropping this down you will be able to select the Char/Map server to use. As of right now, you could potentially administrate as many char/map servers as you wanted, I have not found any limit. The plan is to have your admin panel groups restrict access to specific servers. So, you can lock everyone out of another server if you wanted to. But as of right now, each group would have the same permissions on each server. This may change depending on what I see the need for. The configuration for this is accomplished in two places, both in the config directory. hat.php has the configuration array for setting the main things up, like the human readable server name and the database server name. The remaining configuration is done in database.php. Add a separate group for each server you have. The 'database_group' setting in hat.php MUST match up with what you name the database in database.php. Hope everyone enjoys! NOTE: I've received some questions regarding this. When I say "Multiple Char/Map servers" I mean that there is 1 login server, and then 2 character servers connected to it, and from there, each character server has a map server connected to it, NOT One login, one char, and multiple map servers. Kind of like this: |==========| |=========| | char | | map | /========| server |======| server | |--------------| / | s1 | | | | | / |==========| |=========| | login |/ | server | | | |==========| |=========| |--------------| | char | | map | ========| server |======| server | | s2 | | | |==========| |=========| 3 karazu, Hadeszeus and JulioCF reacted to this Quote Share this post Link to post Share on other sites