This does not solve a bug where a (g)aline hit apparently results in both OnUserConnect and the xline apply methods to be called.
Merge branch 'master' of https://github.com/WindowsUser/inspircd-modules
This still did not fix the bug but it's what I tried.