Switch to non deprecated method.

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