aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-01-13 16:52:05 +0100
committerkdx <kikoodx@paranoici.org>2023-01-13 16:52:05 +0100
commite75c741edbbc0d34002508178c3d7d9358a21eec (patch)
treec404bf06ad90428b8f88196ed29a6e45f3f7f4c3
parentb1315b02c794b4429011f5f7565d574b452b529d (diff)
downloadtwtxtc-e75c741edbbc0d34002508178c3d7d9358a21eec.tar.gz
remove broken mention handling
-rw-r--r--twtxt.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/twtxt.c b/twtxt.c
index ed42cef..fd15e87 100644
--- a/twtxt.c
+++ b/twtxt.c
@@ -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,