Changeset 81ee561 for root_commands.c
- Timestamp:
- 2010-03-20T18:03:18Z (14 years ago)
- Branches:
- master
- Children:
- 85693e6
- Parents:
- 3330468 (diff), 0baed0d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r3330468 r81ee561 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 04Wilmer van der Gaast and others *4 * Copyright 2002-2010 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 654 654 irc_usermsg( irc, "Nick `%s' can't be changed", cmd[1] ); 655 655 } 656 else if( g_strcasecmp( cmd[1], irc->channel ) == 0 ) 657 { 658 if( strchr( CTYPES, cmd[2][0] ) && nick_ok( cmd[2] + 1 ) ) 659 { 660 u = user_find( irc, irc->nick ); 661 662 irc_part( irc, u, irc->channel ); 663 g_free( irc->channel ); 664 irc->channel = g_strdup( cmd[2] ); 665 irc_join( irc, u, irc->channel ); 666 667 if( strcmp( cmd[0], "set_rename" ) != 0 ) 668 set_setstr( &irc->set, "control_channel", cmd[2] ); 669 } 670 } 656 671 else if( user_find( irc, cmd[2] ) && ( nick_cmp( cmd[1], cmd[2] ) != 0 ) ) 657 672 { … … 701 716 702 717 return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : SET_INVALID; 718 } 719 720 char *set_eval_control_channel( set_t *set, char *new_name ) 721 { 722 irc_t *irc = set->data; 723 724 if( strcmp( irc->channel, new_name ) != 0 ) 725 { 726 char *cmd[] = { "set_rename", irc->channel, new_name, NULL }; 727 728 cmd_rename( irc, cmd ); 729 } 730 731 return strcmp( irc->channel, new_name ) == 0 ? new_name : SET_INVALID; 703 732 } 704 733 … … 914 943 online = 1; 915 944 else 916 online = 945 online = away = 1; 917 946 918 947 if( strchr( irc->umode, 'b' ) != NULL ) … … 927 956 if( online == 1 ) 928 957 { 958 char st[256] = "Online"; 959 960 if( u->status_msg ) 961 g_snprintf( st, sizeof( st ) - 1, "Online (%s)", u->status_msg ); 962 929 963 g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); 930 irc_usermsg( irc, format, u->nick, s, "Online");964 irc_usermsg( irc, format, u->nick, s, st ); 931 965 } 932 966
Note: See TracChangeset
for help on using the changeset viewer.