Cotix / cReddit

CLI Reddit client written in C. Oh, crossplatform too!
Other
96 stars 14 forks source link

creddit: libreddit: Fix useragent #49

Closed mkilgore closed 11 years ago

mkilgore commented 11 years ago

This patch modifies how the UserAgent String is handled. libreddit has it's own internal string, and then the program using libreddt (cReddit in this case) also sets its own UserAgent that is appended onto libreddit's UserAgent. The result is a string like below:

'libreddit/0.0.1 (http://github.com/Cotix/cReddit) cReddit/0.0.1'

You would get the above if you set cReddit's UserAgent to be 'cReddit/0.0.1'.

The advantage here is that libreddit and cReddit get a separate identifier, and anything using libreddit can identify with its own UserAgent separate from cReddit.