Changeset 7bf4326 for root_commands.c


Ignore:
Timestamp:
2007-07-01T12:20:23Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
40ef702
Parents:
a3d5766
Message:

Better groupchat channel name generation/verification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    ra3d5766 r7bf4326  
    912912        if( cmd[3] )
    913913        {
    914                 channel = g_strdup( cmd[3] );
     914                if( channel[0] != '#' && channel[0] != '&' )
     915                        channel = g_strdup_printf( "&%s", cmd[3] );
     916                else
     917                        channel = g_strdup( cmd[3] );
    915918        }
    916919        else
     
    929932                password = cmd[5];
    930933       
    931         if( channel[0] != '#' && channel[0] != '&' )
     934        if( !nick_ok( channel + 1 ) )
    932935        {
    933936                irc_usermsg( irc, "Invalid channel name: %s", channel );
Note: See TracChangeset for help on using the changeset viewer.