Changeset dfde8e0 for protocols


Ignore:
Timestamp:
2005-11-26T02:24:38Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b20b32f, f712188
Parents:
30f248a
Message:

Messages specific to a connection only mention the handle now if necessary (i.e. if there is more than one connection to that IM-network). Should close #26.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r30f248a rdfde8e0  
    234234{
    235235        va_list params;
    236         char text[1024], buf[1024];
     236        char text[1024], buf[1024], acc_id[33];
    237237        char *msg;
     238        account_t *a;
    238239       
    239240        va_start( params, format );
     
    251252                strip_html( msg );
    252253       
    253         irc_usermsg( gc->irc, "%s(%s) - %s", proto_name[gc->protocol], gc->username, msg );
     254        /* Try to find a different connection on the same protocol. */
     255        for( a = gc->irc->accounts; a; a = a->next )
     256                if( proto_prpl[a->protocol] == gc->prpl && a->gc != gc )
     257                        break;
     258       
     259        /* If we found one, add the screenname to the acc_id. */
     260        if( a )
     261                g_snprintf( acc_id, 32, "%s(%s)", proto_name[gc->protocol], gc->username );
     262        else
     263                g_snprintf( acc_id, 32, "%s", proto_name[gc->protocol] );
     264       
     265        irc_usermsg( gc->irc, "%s - %s", acc_id, msg );
    254266}
    255267
Note: See TracChangeset for help on using the changeset viewer.