Manually made changes pushed up by Zhyrohaad/allan in this now-closed pull request, since it could not automatically be merged for some mysterious reason.  Tested and working.
https://github.com/evemuproject/evemu_server/pull/81