Fix messages on networks that have chantypes the same as nick prefixes

Closes #763