Changeset c53911e


Ignore:
Timestamp:
2006-05-20T11:48:08Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
68b518d6, f66c701
Parents:
881fd4e
Message:

Fixed a string handling mistake and better stripping of servernames used
in user_t structures.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r881fd4e rc53911e  
    483483        else if( gc->user->proto_opt[0] && *gc->user->proto_opt[0] )
    484484        {
    485                 u->host = g_strdup( gc->user->proto_opt[0] );
     485                char *colon;
     486               
     487                if( ( colon = strchr( gc->user->proto_opt[0], ':' ) ) )
     488                        u->host = g_strndup( gc->user->proto_opt[0],
     489                                             colon - gc->user->proto_opt[0] );
     490                else
     491                        u->host = g_strdup( gc->user->proto_opt[0] );
     492               
    486493                u->user = g_strdup( handle );
    487494               
  • user.c

    r881fd4e rc53911e  
    168168        u->nick = g_strdup( newnick );
    169169        if( !u->user ) u->user = u->nick;
    170         if( !u->host ) u->user = u->host;
    171         if( !u->realname ) u->user = u->realname;
     170        if( !u->host ) u->host = u->nick;
     171        if( !u->realname ) u->realname = u->nick;
    172172       
    173173        /* Remove the old reference to this user from the hash and create a
Note: See TracChangeset for help on using the changeset viewer.