- Timestamp:
- 2015-05-07T23:12:06Z (10 years ago)
- Branches:
- master
- Children:
- 81a15da
- Parents:
- b71f599
- git-author:
- dequis <dx@…> (07-05-15 19:53:58)
- git-committer:
- dequis <dx@…> (07-05-15 23:12:06)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
rb71f599 r33528bd 483 483 } 484 484 485 static gboolean twitter_length_check(struct im_connection *ic, gchar * msg) 486 { 487 int max = set_getint(&ic->acc->set, "message_length"), len; 488 int target_len = set_getint(&ic->acc->set, "target_url_length"); 485 int twitter_message_len(gchar *msg, int target_len) 486 { 489 487 int url_len_diff = 0; 490 488 … … 493 491 } 494 492 495 if (max == 0 || (len = g_utf8_strlen(msg, -1) + url_len_diff) <= max) { 493 return g_utf8_strlen(msg, -1) + url_len_diff; 494 } 495 496 static gboolean twitter_length_check(struct im_connection *ic, gchar * msg) 497 { 498 int max = set_getint(&ic->acc->set, "message_length"); 499 int target_len = set_getint(&ic->acc->set, "target_url_length"); 500 int len = twitter_message_len(msg, target_len); 501 502 if (max == 0 || len <= max) { 496 503 return TRUE; 497 504 }
Note: See TracChangeset
for help on using the changeset viewer.