Add support for recording PRs.

Also some minor fixes:

 - Set some hardcoded values as #defines.

 - out->user should be exclam + 1 and not exclam + 2. The presence of
   the tilde simply means the host does not have an accessible identd
   and should still be considered as part of user name.