Changeset 52cae01 for protocols/purple
- Timestamp:
- 2010-03-07T23:08:40Z (15 years ago)
- Branches:
- master
- Children:
- bab1c86
- Parents:
- 279607e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r279607e r52cae01 4 4 * libpurple module - Main file * 5 5 * * 6 * Copyright 20 09Wilmer van der Gaast <wilmer@gaast.net> *6 * Copyright 2010 Wilmer van der Gaast <wilmer@gaast.net> * 7 7 * * 8 8 * This program is free software; you can redistribute it and/or modify * … … 57 57 PurplePlugin *prpl = purple_plugins_find_with_id( (char*) acc->prpl->data ); 58 58 PurplePluginProtocolInfo *pi = prpl->info->extra_info; 59 GList *i; 60 59 PurpleAccount *pa; 60 GList *i, *st; 61 62 /* Convert all protocol_options into per-account setting variables. */ 61 63 for( i = pi->protocol_options; i; i = i->next ) 62 64 { … … 100 102 } 101 103 } 104 105 /* Go through all away states to figure out if away/status messages 106 are possible. */ 107 pa = purple_account_new( acc->user, (char*) acc->prpl->data ); 108 for( st = purple_account_get_status_types( pa ); st; st = st->next ) 109 { 110 PurpleStatusPrimitive prim = purple_status_type_get_primitive( st->data ); 111 112 if( prim == PURPLE_STATUS_AVAILABLE ) 113 { 114 if( purple_status_type_get_attr( st->data, "message" ) ) 115 acc->flags |= ACC_FLAG_STATUS_MESSAGE; 116 } 117 else if( prim != PURPLE_STATUS_OFFLINE ) 118 { 119 if( purple_status_type_get_attr( st->data, "message" ) ) 120 acc->flags |= ACC_FLAG_AWAY_MESSAGE; 121 } 122 } 123 purple_accounts_remove( pa ); 102 124 } 103 125 … … 224 246 } 225 247 226 if( message )248 if( message && purple_status_type_get_attr( st, "message" ) ) 227 249 { 228 250 args = g_list_append( args, "message" );
Note: See TracChangeset
for help on using the changeset viewer.