Simplify some parser logic relating to prefix modes.

Change-Id: I1764d2e737e9b4f67d7422f6b90e5d11380393a3
Reviewed-on: http://gerrit.dmdirc.com/3960
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>