Send nick before cap and fix logic error