Changeset 495d21b


Ignore:
Timestamp:
2010-11-21T15:53:08Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5df65bd
Parents:
748bcdd
Message:

Chop spaces from IM handles in all cases. Fixes #723.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r748bcdd r495d21b  
    6565                iu->user = g_strndup( bu->handle, s - bu->handle );
    6666        }
    67         else if( bu->ic->acc->server )
    68         {
    69                 iu->host = g_strdup( bu->ic->acc->server );
     67        else
     68        {
    7069                iu->user = g_strdup( bu->handle );
    71                
    72                 /* s/ /_/ ... important for AOL screennames */
    73                 for( s = iu->user; *s; s ++ )
    74                         if( *s == ' ' )
    75                                 *s = '_';
    76         }
    77         else
    78         {
    79                 iu->host = g_strdup( bu->ic->acc->prpl->name );
    80                 iu->user = g_strdup( bu->handle );
    81         }
     70                if( bu->ic->acc->server )
     71                        iu->host = g_strdup( bu->ic->acc->server );
     72                else
     73                        iu->host = g_strdup( bu->ic->acc->prpl->name );
     74        }
     75       
     76        while( ( s = strchr( iu->user, ' ' ) ) )
     77                *s = '_';
    8278       
    8379        if( bu->flags & BEE_USER_LOCAL )
Note: See TracChangeset for help on using the changeset viewer.