Changeset a429907 for root_commands.c


Ignore:
Timestamp:
2010-12-05T12:28:07Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d88c92a
Parents:
fd65edb
Message:

rename -del

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rfd65edb ra429907  
    774774{
    775775        irc_user_t *iu, *old;
    776        
    777         iu = irc_user_by_name( irc, cmd[1] );
     776        gboolean del = g_strcasecmp( cmd[1], "-del" ) == 0;
     777       
     778        iu = irc_user_by_name( irc, cmd[del ? 2 : 1] );
    778779       
    779780        if( iu == NULL )
    780781        {
    781782                irc_usermsg( irc, "Nick `%s' does not exist", cmd[1] );
     783        }
     784        else if( del )
     785        {
     786                if( iu->bu )
     787                        bee_irc_user_nick_reset( iu );
     788                irc_usermsg( irc, "Nickname reset to `%s'", iu->nick );
    782789        }
    783790        else if( iu == irc->user )
Note: See TracChangeset for help on using the changeset viewer.