Changeset 1195cec for root_commands.c


Ignore:
Timestamp:
2008-04-05T13:03:31Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
aa31117
Parents:
f35aee7
Message:

Changed root nicknames are now saved. (Bug #378)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rf35aee7 r1195cec  
    603603                        g_free( irc->mynick );
    604604                        irc->mynick = g_strdup( cmd[2] );
     605                       
     606                        if( strcmp( cmd[0], "set_rename" ) != 0 )
     607                                set_setstr( &irc->set, "root_nick", cmd[2] );
    605608                }
    606609                else if( u->send_handler == buddy_send_handler )
     
    611614                irc_usermsg( irc, "Nick successfully changed" );
    612615        }
     616}
     617
     618char *set_eval_root_nick( set_t *set, char *new_nick )
     619{
     620        irc_t *irc = set->data;
     621       
     622        if( strcmp( irc->mynick, new_nick ) != 0 )
     623        {
     624                char *cmd[] = { "set_rename", irc->mynick, new_nick, NULL };
     625               
     626                cmd_rename( irc, cmd );
     627        }
     628       
     629        return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : NULL;
    613630}
    614631
Note: See TracChangeset for help on using the changeset viewer.