Generify that thing good.

Change-Id: I573083484cc41b92fcdc1c63964e02ab459df060
Reviewed-on: http://gerrit.dmdirc.com/3776
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>