Changeset b75671d for protocols/msn/msn.c
- Timestamp:
- 2015-06-17T22:47:26Z (9 years ago)
- Children:
- b441614
- Parents:
- d832164 (diff), 2f99f23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rd832164 rb75671d 46 46 s->flags |= ACC_SET_OFFLINE_ONLY; 47 47 48 set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); 48 s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); 49 s->flags |= ACC_SET_OFFLINE_ONLY; 50 51 s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc); 52 s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK; 49 53 50 54 acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE | … … 82 86 msn_ns_connect(ic, server, 83 87 set_getint(&ic->acc->set, "port")); 88 89 if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) { 90 imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL); 91 } 84 92 } 85 93 … … 144 152 { 145 153 struct bee_user *bu = bee_user_by_handle(ic->bee, ic, who); 146 147 #ifdef DEBUG 148 if (strcmp(who, "raw") == 0) { 149 msn_ns_write(ic, -1, "%s\r\n", message); 150 return 0; 151 } 152 #endif 153 154 msn_ns_sendmessage(ic, bu, message); 155 return(0); 154 msn_ns_send_message(ic, bu, message); 155 return 0; 156 156 } 157 157 … … 277 277 return 0; 278 278 } else if (typing & OPT_TYPING) { 279 return (msn_buddy_msg(ic, who, TYPING_NOTIFICATION_MESSAGE, 0));279 return msn_ns_send_typing(ic, bu); 280 280 } else { 281 281 return 1; … … 338 338 339 339 g_tree_remove(md->domaintree, bu->handle); 340 }341 342 GList *msn_buddy_action_list(bee_user_t *bu)343 {344 static GList *ret = NULL;345 346 if (ret == NULL) {347 static const struct buddy_action ba[2] = {348 { "NUDGE", "Draw attention" },349 };350 351 ret = g_list_prepend(ret, (void *) ba + 0);352 }353 354 return ret;355 }356 357 void *msn_buddy_action(struct bee_user *bu, const char *action, char * const args[], void *data)358 {359 if (g_strcasecmp(action, "NUDGE") == 0) {360 msn_buddy_msg(bu->ic, bu->handle, NUDGE_MESSAGE, 0);361 }362 363 return NULL;364 340 } 365 341 … … 392 368 ret->buddy_data_add = msn_buddy_data_add; 393 369 ret->buddy_data_free = msn_buddy_data_free; 394 ret->buddy_action_list = msn_buddy_action_list;395 ret->buddy_action = msn_buddy_action;396 370 397 371 register_protocol(ret);
Note: See TracChangeset
for help on using the changeset viewer.