diff options
author | kdx <kikoodx@paranoici.org> | 2023-01-13 16:52:05 +0100 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-01-13 16:52:05 +0100 |
commit | e75c741edbbc0d34002508178c3d7d9358a21eec (patch) | |
tree | c404bf06ad90428b8f88196ed29a6e45f3f7f4c3 | |
parent | b1315b02c794b4429011f5f7565d574b452b529d (diff) | |
download | twtxtc-e75c741edbbc0d34002508178c3d7d9358a21eec.tar.gz |
remove broken mention handling
-rw-r--r-- | twtxt.c | 35 |
1 files changed, 0 insertions, 35 deletions
@@ -283,41 +283,6 @@ int main(int argc, char *argv[]) { iLongestNickname = strlen(followingIter->string); } - /* Mentions to someone else than me are against the, uhm, law or so. */ - char mention[100]; - char url[256]; - char mentiontext[500]; - char initialtext[500]; - - if (sscanf(tweet, "@<%s %[^>]> %s", mention, url, mentiontext) == 3) { - if (strncmp(mention, getConfigValue("nickname", ""), strlen(mention)) != 0) { - /* Nope, not me. */ - continue; - } - else { - /* Reformat. */ - char newtweet[500]; - sprintf(newtweet, "@%s %s", mention, mentiontext); -#ifdef _MSC_VER - strcpy_s(tweet, sizeof(tweet), newtweet); -#else - strncpy(tweet, newtweet, sizeof(tweet)); -#endif - } - } - - /* Reformat inline mentions as well: */ - if (sscanf(tweet, "%[^@] @<%s %[^>]> %s", initialtext, mention, url, mentiontext) == 4) { - /* Reformat. */ - char newtweet[500]; - sprintf(newtweet, "%s @%s %s", initialtext, mention, mentiontext); -#ifdef _MSC_VER - strcpy_s(tweet, sizeof(tweet), newtweet); -#else - strncpy(tweet, newtweet, sizeof(tweet)); -#endif - } - struct tm tweettime = { .tm_year = year - 1900, .tm_mon = month - 1, |