Jump to content


Photo

HAT - The Hercules Admin Tool!


  • Please log in to reply
80 replies to this topic

#1 Jman

Jman

    Advanced Member

  • Former Administrator
  • 273 posts
  • IRC Nickname:Jguy
  • Emulator:Hercules
  • Github:jguy1987

Posted 06 February 2015 - 02:47 AM

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/j...7/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/j...dminTool/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/j...dminTool/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/j...7/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.



#2 Mysterious

Mysterious

    Advanced Member

  • Administrators
  • 3632 posts
  • LocationProntera ;3
  • Github:Mystery

Posted 06 February 2015 - 02:59 AM

Finally you posted it :> Now everyone knows <3!

http://upaste.me a paste site with Athena syntax!
Now with the ability to test your athena pastes!


#3 Hyoru

Hyoru

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • Emulator:Hercules

Posted 06 February 2015 - 03:01 AM

Awesome!



#4 Jman

Jman

    Advanced Member

  • Former Administrator
  • 273 posts
  • IRC Nickname:Jguy
  • Emulator:Hercules
  • Github:jguy1987

Posted 06 February 2015 - 03:44 AM

FYI - I've established a development blog of sorts for the Control Panel. You can find it here: http://herc.ws/board...ife-in-the-hat/



#5 Nameless2you

Nameless2you

    Purring

  • Script Developers
  • 738 posts
  • IRC Nickname:Streusel
  • Emulator:Hercules
  • Github:Streusel

Posted 06 February 2015 - 04:39 AM

Yay~ : )


Posted Image
Paste & Test your athena scripts at http://upaste.me, a better pastebin.
Twitch

#6 Skyline

Skyline

    Advanced Member

  • Members
  • PipPipPip
  • 148 posts
  • LocationHeaven
  • Emulator:Hercules

Posted 06 February 2015 - 07:53 AM

This looks great! :)


ALL HAIL! [Emistry]

ALL HAIL! [Dastgir]

ALL HAIL! [Aeromesi]

ALL HAIL! [AnnieRuru]
All Hail Hercules!


#7 Yommy

Yommy

    Advanced Member

  • High Council
  • 297 posts
  • LocationEngland
  • Emulator:Hercules
  • Github:Yommy

Posted 06 February 2015 - 10:49 AM

:wub:


Hercules Council Member.

#8 Emistry

Emistry

    Advanced Member

  • Former Support Leader
  • 511 posts
  • LocationMalaysia
  • Emulator:Hercules
  • Github:Emistry

Posted 06 February 2015 - 12:21 PM

this is great =)

 

how about adding feature like sending @commands from HAT to ingame ??

or sending linux commnad to server like putty ??



#9 Jman

Jman

    Advanced Member

  • Former Administrator
  • 273 posts
  • IRC Nickname:Jguy
  • Emulator:Hercules
  • Github:jguy1987

Posted 06 February 2015 - 03:05 PM

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.



#10 Wolf

Wolf

    Advanced Member

  • Int'l Portuguese Moderators
  • 166 posts
  • Emulator:brAthena

Posted 07 February 2015 - 02:54 PM

Nice Jman!  ^_^



#11 Roberto

Roberto

    Newbie

  • Members
  • Pip
  • 7 posts
  • LocationBrazil
  • Emulator:Hercules
  • Github:robertol

Posted 07 February 2015 - 11:14 PM

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.



#12 Jman

Jman

    Advanced Member

  • Former Administrator
  • 273 posts
  • IRC Nickname:Jguy
  • Emulator:Hercules
  • Github:jguy1987

Posted 07 February 2015 - 11:54 PM

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.



#13 Jman

Jman

    Advanced Member

  • Former Administrator
  • 273 posts
  • IRC Nickname:Jguy
  • Emulator:Hercules
  • Github:jguy1987

Posted 10 February 2015 - 01:32 AM

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

 

Posted Image

 

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 @[email protected] 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:

 

Posted Image

 

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:

 

Posted Image

 

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.



#14 Shatowolf

Shatowolf

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 11 February 2015 - 04:13 AM

Awesome!! thanks man. 



#15 saithis

saithis

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 13 February 2015 - 06:41 AM

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.



#16 Hadeszeus

Hadeszeus

    Advanced Member

  • Members
  • PipPipPip
  • 630 posts
  • LocationPhilippines

Posted 13 February 2015 - 08:41 AM

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

 

also, dont forget to include char_reg_num_db maybe in character section/tab. (editable)


Edited by Hadeszeus, 13 February 2015 - 08:46 AM.

~ Thank you is not Enough Hercules ~
Certified
Fan of AnnieRuru  :wub: 


#17 Jman

Jman

    Advanced Member

  • Former Administrator
  • 273 posts
  • IRC Nickname:Jguy
  • Emulator:Hercules
  • Github:jguy1987

Posted 22 February 2015 - 09:48 PM

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

 

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?



#18 Hadeszeus

Hadeszeus

    Advanced Member

  • Members
  • PipPipPip
  • 630 posts
  • LocationPhilippines

Posted 23 February 2015 - 07:49 AM

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

 

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.


~ Thank you is not Enough Hercules ~
Certified
Fan of AnnieRuru  :wub: 


#19 Hadeszeus

Hadeszeus

    Advanced Member

  • Members
  • PipPipPip
  • 630 posts
  • LocationPhilippines

Posted 02 March 2015 - 01:33 PM

:meow: POKE 


~ Thank you is not Enough Hercules ~
Certified
Fan of AnnieRuru  :wub: 


#20 vBrenth

vBrenth

    Advanced Member

  • Members
  • PipPipPip
  • 328 posts
  • IRC Nickname:Zeira
  • LocationPhilippines
  • Emulator:Hercules
  • Github:vBrenth

Posted 03 March 2015 - 03:18 PM

poke too :D regarding the last_mac






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


This topic has been visited by 527 user(s)