Bugfixes and code cleanup.
Added variant to /motd to allow setting temporary MOTD (until server restarts)
Merge pull request #1023 from olee/1710_branch

Bugfixes and code cleanup.