diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-05-31 10:25:43 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-05-31 10:25:43 -0400 |
commit | 8170d9f9b3ac8baaf62f253701940531d27dcfbb (patch) | |
tree | 23023827da799e4942447b962b4ad09d55b424ac | |
parent | d4c7cc7bf69b81c63c4229d4a7ae505a1180dc90 (diff) | |
download | infinite-8170d9f9b3ac8baaf62f253701940531d27dcfbb.tar.gz infinite-8170d9f9b3ac8baaf62f253701940531d27dcfbb.tar.bz2 infinite-8170d9f9b3ac8baaf62f253701940531d27dcfbb.zip |
Bot now signs its captions
-rw-r--r-- | infinite.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/infinite.cpp b/infinite.cpp index 1086169..d9b17c8 100644 --- a/infinite.cpp +++ b/infinite.cpp | |||
@@ -790,12 +790,12 @@ int main(int argc, char** argv) | |||
790 | } | 790 | } |
791 | 791 | ||
792 | std::string tweetText; | 792 | std::string tweetText; |
793 | size_t tweetLim = 140 - client.getConfiguration().getCharactersReservedPerMedia() - 2; | 793 | size_t tweetLim = 140 - client.getConfiguration().getCharactersReservedPerMedia() - client.getUser().getScreenName().length() - 5; |
794 | if (action.length() > tweetLim) | 794 | if (action.length() > tweetLim) |
795 | { | 795 | { |
796 | tweetText = "\"" + action.substr(0, tweetLim - 1) + "…\""; | 796 | tweetText = "\"" + action.substr(0, tweetLim - 1) + "…\" --@" + client.getUser().getScreenName(); |
797 | } else { | 797 | } else { |
798 | tweetText = "\"" + action + "\""; | 798 | tweetText = "\"" + action + "\" --@" + client.getUser().getScreenName(); |
799 | } | 799 | } |
800 | 800 | ||
801 | twitter::tweet tw; | 801 | twitter::tweet tw; |