Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r33528bd rc43146d  
    483483}
    484484
    485 int twitter_message_len(gchar *msg, int target_len)
    486 {
     485static 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");
    487489        int url_len_diff = 0;
    488490
     
    491493        }
    492494
    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) {
     495        if (max == 0 || (len = g_utf8_strlen(msg, -1) + url_len_diff) <= max) {
    503496                return TRUE;
    504497        }
Note: See TracChangeset for help on using the changeset viewer.