Changeset f97b8e9 for protocols/twitter


Ignore:
Timestamp:
2012-11-25T20:43:52Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
67f6828
Parents:
3592b95
Message:

Use hex for show_ids, but stick to the 2-char maximum. a 256-message backlog
really should be enough.

Location:
protocols/twitter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r3592b95 rf97b8e9  
    558558        guint64 id = 0;
    559559        if (g_str_has_prefix(arg, "#") &&
    560                 sscanf(arg + 1, "%" G_GUINT64_FORMAT, &id) == 1) {
     560            sscanf(arg + 1, "%" G_GINT64_MODIFIER "x", &id) == 1) {
    561561                if (id < TWITTER_LOG_LENGTH && td->log)
    562562                        id = td->log[id].id;
     
    564564                (tud = bu->data) && tud->last_id)
    565565                id = tud->last_id;
    566         else if (sscanf(arg, "%" G_GUINT64_FORMAT, &id) == 1){
     566        else if (sscanf(arg, "%" G_GINT64_MODIFIER "x", &id) == 1){
    567567                if (id < TWITTER_LOG_LENGTH && td->log)
    568568                        id = td->log[id].id;
  • protocols/twitter/twitter.h

    r3592b95 rf97b8e9  
    8585};
    8686
    87 #define TWITTER_LOG_LENGTH 100
     87#define TWITTER_LOG_LENGTH 256
    8888struct twitter_log_data
    8989{
  • protocols/twitter/twitter_lib.c

    r3592b95 rf97b8e9  
    644644        if (set_getbool(&ic->acc->set, "show_ids")) {
    645645                if (reply_to != -1)
    646                         return g_strdup_printf("\002[\002%02d->%02d\002]\002 %s%s",
     646                        return g_strdup_printf("\002[\002%02x->%02x\002]\002 %s%s",
    647647                                               td->log_id, reply_to, prefix, txs->text);
    648648                else
    649                         return g_strdup_printf("\002[\002%02d\002]\002 %s%s",
     649                        return g_strdup_printf("\002[\002%02x\002]\002 %s%s",
    650650                                               td->log_id, prefix, txs->text);
    651651        } else {
Note: See TracChangeset for help on using the changeset viewer.