Changeset 39f93f0 for irc_commands.c
- Timestamp:
- 2008-08-31T13:42:33Z (16 years ago)
- Branches:
- master
- Children:
- d995c9b
- Parents:
- 0e639f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_commands.c
r0e639f5 r39f93f0 125 125 static void irc_cmd_mode( irc_t *irc, char **cmd ) 126 126 { 127 if( *cmd[1] == '#' || *cmd[1] == '&')127 if( strchr( CTYPES, *cmd[1] ) ) 128 128 { 129 129 if( cmd[2] ) … … 193 193 else if( cmd[1] ) 194 194 { 195 if( ( cmd[1][0] == '#' || cmd[1][0] == '&' ) && cmd[1][1] ) 196 { 197 user_t *u = user_find( irc, cmd[1] + 1 ); 198 199 if( u && u->ic && u->ic->acc->prpl->chat_with ) 200 { 201 irc_reply( irc, 403, "%s :Initializing groupchat in a different channel", cmd[1] ); 202 203 if( !u->ic->acc->prpl->chat_with( u->ic, u->handle ) ) 204 { 205 irc_usermsg( irc, "Could not open a groupchat with %s.", u->nick ); 206 } 207 } 208 else if( u ) 209 { 210 irc_reply( irc, 403, "%s :Groupchats are not possible with %s", cmd[1], cmd[1]+1 ); 211 } 212 else 213 { 214 irc_reply( irc, 403, "%s :No such nick", cmd[1] ); 195 struct groupchat *gc; 196 struct chat *c; 197 user_t *u; 198 199 if( strchr( CTYPES, cmd[1][0] ) == NULL || cmd[1][1] == 0 ) 200 { 201 irc_reply( irc, 403, "%s :No such channel", cmd[1] ); 202 return; 203 } 204 205 if( ( c = chat_bychannel( irc, cmd[1] ) ) ) 206 { 207 char *nick = set_getstr( &c->set, "nick" ); 208 209 if( nick == NULL ) 210 nick = irc->nick; 211 212 if( ( gc = c->acc->prpl->chat_join( c->acc->ic, c->handle, nick, NULL ) ) ) 213 { 214 g_free( gc->channel ); 215 gc->channel = g_strdup( c->channel ); 215 216 } 216 217 }
Note: See TracChangeset
for help on using the changeset viewer.