Changeset 134a02c


Ignore:
Timestamp:
2010-06-27T16:04:28Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1c40aa7
Parents:
547ea68
Message:

irc_channel_name_strip() instead of nick_strip().

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • irc.h

    r547ea68 r134a02c  
    234234void irc_channel_printf( irc_channel_t *ic, char *format, ... );
    235235gboolean irc_channel_name_ok( const char *name );
     236void irc_channel_name_strip( char *name );
    236237int irc_channel_name_cmp( const char *a_, const char *b_ );
    237238void irc_channel_update_ops( irc_channel_t *ic, char *value );
  • irc_channel.c

    r547ea68 r134a02c  
    285285       
    286286        return TRUE;
     287}
     288
     289void irc_channel_name_strip( char *name )
     290{
     291        int i, j;
     292       
     293        for( i = j = 0; name[i]; i ++ )
     294                if( name[i] > ' ' && name[i] != ',' )
     295                        name[j++] = name[i];
     296       
     297        name[j] = '\0';
    287298}
    288299
  • irc_im.c

    r547ea68 r134a02c  
    535535        strncpy( stripped, name, MAX_NICK_LENGTH );
    536536        stripped[MAX_NICK_LENGTH] = '\0';
    537         nick_strip( stripped );
     537        irc_channel_name_strip( stripped );
    538538        if( set_getbool( &bee->set, "lcnicks" ) )
    539539                nick_lc( stripped );
    540540       
    541         full_name = g_strdup_printf( "&%s", stripped );
     541        full_name = g_strdup_printf( "#%s", stripped );
    542542       
    543543        if( stripped[0] && irc_channel_by_name( irc, full_name ) == NULL )
  • root_commands.c

    r547ea68 r134a02c  
    10161016                        g_free( channel );
    10171017                        channel = s;
     1018                       
     1019                        irc_channel_name_strip( channel );
    10181020                }
    10191021               
Note: See TracChangeset for help on using the changeset viewer.