- Timestamp:
- 2015-03-15T09:31:18Z (10 years ago)
- Children:
- ac6855b3
- Parents:
- c0e4c22
- git-author:
- dequis <dx@…> (05-03-15 10:31:24)
- git-committer:
- dequis <dx@…> (15-03-15 09:31:18)
- Location:
- protocols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/bee.h
rc0e4c22 r830864d 115 115 gboolean (*chat_new)(bee_t *bee, struct groupchat *c); 116 116 gboolean (*chat_free)(bee_t *bee, struct groupchat *c); 117 gboolean (*chat_placeholder_new)(bee_t *bee, struct im_connection *ic, const char *handle, 118 const char *name, const char *topic); 117 119 /* System messages of any kind. */ 118 120 gboolean (*chat_log)(bee_t *bee, struct groupchat *c, const char *text); … … 165 167 * user, too. */ 166 168 G_MODULE_EXPORT struct groupchat *imcb_chat_new(struct im_connection *ic, const char *handle); 169 G_MODULE_EXPORT void imcb_chat_placeholder_new(struct im_connection *ic, const char *handle, const char *name, 170 const char *topic); 167 171 G_MODULE_EXPORT void imcb_chat_name_hint(struct groupchat *c, const char *name); 168 172 G_MODULE_EXPORT void imcb_chat_free(struct groupchat *c); -
protocols/bee_chat.c
rc0e4c22 r830864d 54 54 } 55 55 56 void imcb_chat_placeholder_new(struct im_connection *ic, const char *handle, const char *name, const char *topic) 57 { 58 bee_t *bee = ic->bee; 59 60 if (bee->ui->chat_placeholder_new) { 61 bee->ui->chat_placeholder_new(bee, ic, handle, name, topic); 62 } 63 } 64 56 65 void imcb_chat_name_hint(struct groupchat *c, const char *name) 57 66 { -
protocols/jabber/hipchat.c
rc0e4c22 r830864d 132 132 while ((c = xt_find_node(c, "item"))) { 133 133 struct xt_node *c2; 134 struct groupchat *gc;135 struct irc_channel *ircc;136 134 char *topic = NULL; 137 gboolean new_room = FALSE;138 135 char *jid = xt_find_attr(c, "jid"); 139 136 char *name = xt_find_attr(c, "name"); … … 146 143 } 147 144 148 gc = bee_chat_by_title(ic->bee, ic, jid); 149 if (!gc) { 150 gc = imcb_chat_new(ic, jid); 151 new_room = TRUE; 152 } 153 imcb_chat_name_hint(gc, name); 154 imcb_chat_topic(gc, NULL, topic, 0); 155 156 ircc = gc->ui_data; 157 set_setstr(&ircc->set, "account", ic->acc->tag); 158 set_setstr(&ircc->set, "room", jid); 159 set_setstr(&ircc->set, "chat_type", "room"); 160 161 if (new_room) { 162 /* This cleans everything but leaves the irc channel around, 163 * since it just graduated to a room.*/ 164 imcb_chat_free(gc); 165 } 166 145 imcb_chat_placeholder_new(ic, jid, name, topic); 167 146 c = c->next; 168 147 }
Note: See TracChangeset
for help on using the changeset viewer.