Changeset eb37735 for irc_channel.c
- Timestamp:
- 2010-05-08T23:54:37Z (14 years ago)
- Branches:
- master
- Children:
- 36577aa
- Parents:
- 66b9e36a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_channel.c
r66b9e36a reb37735 28 28 static gint irc_channel_user_cmp( gconstpointer a_, gconstpointer b_ ); 29 29 static const struct irc_channel_funcs control_channel_funcs; 30 static const struct irc_channel_funcs groupchat_stub_funcs; 30 31 31 32 irc_channel_t *irc_channel_new( irc_t *irc, const char *name ) … … 37 38 38 39 ic = g_new0( irc_channel_t, 1 ); 39 ic->f = &control_channel_funcs;40 40 ic->irc = irc; 41 41 ic->name = g_strdup( name ); … … 48 48 49 49 irc->channels = g_slist_prepend( irc->channels, ic ); 50 51 if( name[0] == '&' ) 52 ic->f = &control_channel_funcs; 53 else /* if( name[0] == '#' ) */ 54 ic->f = &groupchat_stub_funcs; 50 55 51 56 return ic; … … 251 256 control_channel_privmsg, 252 257 }; 258 259 /* Groupchat stub: Only handles /INVITE at least for now. */ 260 static gboolean groupchat_stub_invite( irc_channel_t *ic, irc_user_t *iu ) 261 { 262 bee_user_t *bu = iu->bu; 263 264 if( iu->bu->ic->acc->prpl->chat_with ) 265 { 266 ic->flags |= IRC_CHANNEL_CHAT_PICKME; 267 iu->bu->ic->acc->prpl->chat_with( bu->ic, bu->handle ); 268 ic->flags &= ~IRC_CHANNEL_CHAT_PICKME; 269 return TRUE; 270 } 271 else 272 { 273 irc_send_num( ic->irc, 482, "%s :IM protocol does not support room invitations", ic->name ); 274 return FALSE; 275 } 276 } 277 278 static const struct irc_channel_funcs groupchat_stub_funcs = { 279 NULL, 280 NULL, 281 NULL, 282 NULL, 283 groupchat_stub_invite, 284 };
Note: See TracChangeset
for help on using the changeset viewer.