- Timestamp:
- 2010-03-08T01:21:08Z (15 years ago)
- Branches:
- master
- Children:
- fdba6bc
- Parents:
- 52cae01
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r52cae01 rbab1c86 4 4 * libpurple module - Main file * 5 5 * * 6 * Copyright 20 10 Wilmer van der Gaast <wilmer@gaast.net>*6 * Copyright 2009-2010 Wilmer van der Gaast <wilmer@gaast.net> * 7 7 * * 8 8 * This program is free software; you can redistribute it and/or modify * … … 59 59 PurpleAccount *pa; 60 60 GList *i, *st; 61 set_t *s; 61 62 62 63 /* Convert all protocol_options into per-account setting variables. */ … … 67 68 char *def = NULL; 68 69 set_eval eval = NULL; 69 set_t *s;70 70 71 71 name = purple_account_option_get_setting( o ); … … 103 103 } 104 104 105 if( pi->options & OPT_PROTO_MAIL_CHECK ) 106 { 107 s = set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc ); 108 s->flags |= ACC_SET_OFFLINE_ONLY; 109 } 110 105 111 /* Go through all away states to figure out if away/status messages 106 112 are possible. */ … … 159 165 } 160 166 } 167 168 if( pi->options & OPT_PROTO_MAIL_CHECK ) 169 purple_account_set_check_mail( pa, set_getbool( &acc->set, "mail_notifications" ) ); 161 170 } 162 171 … … 238 247 239 248 if( state_txt == NULL && 240 purple_status_type_get_primitive( st->data) == PURPLE_STATUS_AVAILABLE )249 purple_status_type_get_primitive( pst ) == PURPLE_STATUS_AVAILABLE ) 241 250 break; 242 251 … … 246 255 } 247 256 248 if( message && purple_status_type_get_attr( st, "message" ) )257 if( message && purple_status_type_get_attr( pst, "message" ) ) 249 258 { 250 259 args = g_list_append( args, "message" ); … … 589 598 }; 590 599 600 static void *prplcb_notify_email( PurpleConnection *gc, const char *subject, const char *from, 601 const char *to, const char *url ) 602 { 603 struct im_connection *ic = purple_ic_by_gc( gc ); 604 605 imcb_log( ic, "Received e-mail from %s for %s: %s <%s>", from, to, subject, url ); 606 607 return NULL; 608 } 609 610 static PurpleNotifyUiOps bee_notify_uiops = 611 { 612 NULL, 613 prplcb_notify_email, 614 }; 615 591 616 static void purple_ui_init() 592 617 { … … 595 620 purple_conversations_set_ui_ops( &bee_conv_uiops ); 596 621 purple_request_set_ui_ops( &bee_request_uiops ); 622 purple_notify_set_ui_ops(&bee_notify_uiops); 597 623 //purple_debug_set_ui_ops( &bee_debug_uiops ); 598 624 } … … 644 670 help = g_string_new("BitlBee libpurple module supports the following IM protocols:\n"); 645 671 672 /* Add a protocol entry to BitlBee's structures for every protocol 673 supported by this libpurple instance. */ 646 674 for( prots = purple_plugins_get_protocols(); prots; prots = prots->next ) 647 675 { … … 657 685 g_string_append_printf( help, "\n* %s (%s)", ret->name, prot->info->name ); 658 686 687 /* libpurple doesn't define a protocol called OSCAR, but we 688 need it to be compatible with normal BitlBee. */ 659 689 if( g_strcasecmp( prot->info->id, "prpl-aim" ) == 0 ) 660 690 { … … 666 696 } 667 697 698 /* Add a simple dynamically-generated help item listing all 699 the supported protocols. */ 668 700 help_add_mem( &global.help, "purple", help->str ); 669 701 g_string_free( help, TRUE );
Note: See TracChangeset
for help on using the changeset viewer.