Changeset 5a75d15 for irc_channel.c
- Timestamp:
- 2010-06-05T22:32:36Z (14 years ago)
- Branches:
- master
- Children:
- c1a8a16
- Parents:
- f5d87ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_channel.c
rf5d87ea r5a75d15 29 29 static gint irc_channel_user_cmp( gconstpointer a_, gconstpointer b_ ); 30 30 static const struct irc_channel_funcs control_channel_funcs; 31 static const struct irc_channel_funcs groupchat_stub_funcs; 31 32 extern const struct irc_channel_funcs irc_channel_im_chat_funcs; 32 33 33 34 irc_channel_t *irc_channel_new( irc_t *irc, const char *name ) … … 104 105 new = &control_channel_funcs; 105 106 else if( strcmp( value, "chat" ) == 0 ) 106 new = & groupchat_stub_funcs;107 new = &irc_channel_im_chat_funcs; 107 108 else 108 109 return SET_INVALID; … … 389 390 control_channel_free, 390 391 }; 391 392 /* Groupchat stub: Only handles /INVITE at least for now. */393 static gboolean groupchat_stub_invite( irc_channel_t *ic, irc_user_t *iu )394 {395 bee_user_t *bu = iu->bu;396 397 if( iu->bu->ic->acc->prpl->chat_with )398 {399 ic->flags |= IRC_CHANNEL_CHAT_PICKME;400 iu->bu->ic->acc->prpl->chat_with( bu->ic, bu->handle );401 ic->flags &= ~IRC_CHANNEL_CHAT_PICKME;402 return TRUE;403 }404 else405 {406 irc_send_num( ic->irc, 482, "%s :IM protocol does not support room invitations", ic->name );407 return FALSE;408 }409 }410 411 static gboolean groupchat_stub_join( irc_channel_t *ic )412 {413 struct irc_groupchat_stub *igs = ic->data;414 415 if( igs && igs->acc->ic && igs->acc->prpl->chat_join )416 {417 ic->flags |= IRC_CHANNEL_CHAT_PICKME;418 igs->acc->prpl->chat_join( igs->acc->ic, igs->room, ic->irc->user->nick, NULL );419 ic->flags &= ~IRC_CHANNEL_CHAT_PICKME;420 return FALSE;421 }422 else423 {424 irc_send_num( ic->irc, 403, "%s :Can't join channel, account offline?", ic->name );425 return FALSE;426 }427 }428 429 static const struct irc_channel_funcs groupchat_stub_funcs = {430 NULL,431 groupchat_stub_join,432 NULL,433 NULL,434 groupchat_stub_invite,435 };
Note: See TracChangeset
for help on using the changeset viewer.