Changes in root_commands.c [9da0bbf:9334cc2]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r9da0bbf r9334cc2 383 383 } 384 384 385 if( cmd[3] )385 if( cmd[3] && set_name ) 386 386 { 387 387 set_t *s = set_find( &a->set, set_name ); … … 912 912 if( cmd[3] ) 913 913 { 914 if( cmd[3][0] != '#' && cmd[3][0] != '&' ) 915 channel = g_strdup_printf( "&%s", cmd[3] ); 916 else 917 channel = g_strdup( cmd[3] ); 914 channel = g_strdup( cmd[3] ); 918 915 } 919 916 else … … 921 918 char *s; 922 919 923 channel = g_strdup _printf( "&%s",chat );920 channel = g_strdup( chat ); 924 921 if( ( s = strchr( channel, '@' ) ) ) 925 922 *s = 0; … … 927 924 if( cmd[3] && cmd[4] ) 928 925 nick = cmd[4]; 929 else930 nick = irc->nick;931 926 if( cmd[3] && cmd[4] && cmd[5] ) 932 927 password = cmd[5]; 933 928 934 if( !nick_ok( channel + 1 ) ) 935 { 936 irc_usermsg( irc, "Invalid channel name: %s", channel ); 937 g_free( channel ); 938 return; 939 } 940 else if( g_strcasecmp( channel, irc->channel ) == 0 || irc_chat_by_channel( irc, channel ) ) 941 { 942 irc_usermsg( irc, "Channel already exists: %s", channel ); 943 g_free( channel ); 944 return; 945 } 946 947 if( ( c = a->prpl->chat_join( ic, chat, nick, password ) ) ) 948 { 949 g_free( c->channel ); 950 c->channel = channel; 951 } 952 else 953 { 954 irc_usermsg( irc, "Tried to join chat, not sure if this was successful" ); 955 g_free( channel ); 956 } 929 c = a->prpl->chat_join( ic, chat, nick, password ); 930 931 g_free( channel ); 957 932 } 958 933
Note: See TracChangeset
for help on using the changeset viewer.