Changeset 5d7dc00 for protocols/jabber


Ignore:
Timestamp:
2007-07-02T21:24:04Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
9da0bbf
Parents:
1962ac1
Message:

Stripping of unwanted characters (@ and =) in channel nicknames.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    r1962ac1 r5d7dc00  
    151151                {
    152152                        if( bud == jc->me )
     153                        {
    153154                                bud->ext_jid = jabber_normalize( ic->acc->user );
     155                        }
    154156                        else
     157                        {
     158                                int i;
     159                               
    155160                                /* Don't want the nick to be at the end, so let's
    156161                                   think of some slightly different notation to use
    157162                                   for anonymous groupchat participants in BitlBee. */
    158163                                bud->ext_jid = g_strdup_printf( "%s=%s", bud->resource, bud->bare_jid );
    159                        
     164                               
     165                                /* And strip any unwanted characters. */
     166                                for( i = 0; bud->resource[i]; i ++ )
     167                                        if( bud->ext_jid[i] == '=' || bud->ext_jid[i] == '@' )
     168                                                bud->ext_jid[i] = '_';
     169                        }
    160170                        bud->flags |= JBFLAG_IS_ANONYMOUS;
    161171                }
Note: See TracChangeset for help on using the changeset viewer.