Saturday, April 26, 2014

Shutdown procedure



Until now there was no proper way to shut down the server. The only way was to kill the JVM process, which didn't save any characters. I finally solved this by adding a proper shutdown-command which properly disconnects and saves all the characters, terminates all the map instances and properly finishes up all the other stuff which happens in the background. I also wrote a server-sided javascript which can be executed from the shell and shuts down the server after a countdown. This utilizes a new admin-broadcast feature I also implemented.

I mostly did the script as a PoC for server-sided scripts started from the console. This might come in really handy for special events managed by GMs.

Saturday, April 12, 2014

Choosing a wiki software

I am currently looking for a wiki software to use.

My should-requirements are:

  • Uses PHP
  • Simple to set up and administrate
  • Syntax similar to MediaWiki
  • Doesn't use databases besides MySQL and MongoDB

My can-requirements are:

  • Possible to hack in a way that it can share user accounts with my game

MediaWiki

My first idea was the popular MediaWiki, but the "What is MediaWiki" section on their homepage says: 

"MediaWiki is geared towards the needs of the Wikimedia Foundation. The program is primarily developed to run on a large server farm for Wikipedia and its sister projects. Features, performance, configurability, ease-of-use, etc are designed in this light; if your needs are radically different the software might not be appropriate for you." 

I just want a wiki for my small little game, not build a million-article encyclopedia running on a dedicated server-farm, so this doesn't really sound like the right software for me.

PmWiki

The second software which caught my eye was PmWiki, pretty much the Anti-MediaWiki.

It is extremely simple to set up, because it doesn't even require a database. It saves everything in flatfiles. This might look strange in this day and age, but they are making a convincing argument. I tried it and the installation was indeed a breeze - just copy the PHP-files and it runs out-of-the-box.

But what really surprised me is that PmWiki by default does not even know the concept of personalized user accounts. In the default configuration, everything can be edited anonymously. When you don't like that, you can set individual passwords, but they are not bound to accounts. Anyone who knows the password can read or edit specifically protected pages.

There are, however, lots of addons which enable mandatory logins with username and password. Many of them are designed to use the user databases of other systems. That likely means that I could write my own which uses the accounts in my MongoDB.


Wednesday, April 9, 2014

MongoDB authentication

I used to run MongoDB authentication-less. I used to rely on a firewall to shield MongoDB against outside access and only allow access from within the server-network like early MongoDB guides suggested, but I know that my skills as a sysadmin are limited. So I decided to enabled user accounts and authentication for MongoDB and add support for authentication to the gameserver. Better safe than sorry.

Sunday, April 6, 2014

Password changing


I replaced the "Logout" button in the control bar with a new button "Menu". This button opens a popup menu with lots of links. "Logout" does the same thing the old logout button did. "Settings" opens a new window which allows the user to change their password.

The other options are links which will lead to various web-applications I still need to set up.