Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/jabber.c @ 32700:1f68af4afe67
Use purple_conversation accessor methods.
author | andrew.victor@mxit.com |
---|---|
date | Sat, 01 Oct 2011 15:03:57 +0000 |
parents | efe38e6319f2 |
children | f75041cb3fec |
comparison
equal
deleted
inserted
replaced
32699:3e2191125ad7 | 32700:1f68af4afe67 |
---|---|
3161 } | 3161 } |
3162 | 3162 |
3163 static PurpleCmdRet jabber_cmd_buzz(PurpleConversation *conv, | 3163 static PurpleCmdRet jabber_cmd_buzz(PurpleConversation *conv, |
3164 const char *cmd, char **args, char **error, void *data) | 3164 const char *cmd, char **args, char **error, void *data) |
3165 { | 3165 { |
3166 JabberStream *js = purple_connection_get_protocol_data(conv->account->gc); | 3166 PurpleAccount *account = purple_conversation_get_account(conv); |
3167 JabberStream *js = purple_connection_get_protocol_data(account->gc); | |
3167 const gchar *who; | 3168 const gchar *who; |
3168 gchar *description; | 3169 gchar *description; |
3169 PurpleBuddy *buddy; | 3170 PurpleBuddy *buddy; |
3170 const char *alias; | 3171 const char *alias; |
3171 PurpleAttentionType *attn = | 3172 PurpleAttentionType *attn = |
3172 purple_get_attention_type_from_code(conv->account, 0); | 3173 purple_get_attention_type_from_code(account, 0); |
3173 | 3174 |
3174 if (!args || !args[0]) { | 3175 if (!args || !args[0]) { |
3175 /* use the buddy from conversation, if it's a one-to-one conversation */ | 3176 /* use the buddy from conversation, if it's a one-to-one conversation */ |
3176 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { | 3177 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { |
3177 who = purple_conversation_get_name(conv); | 3178 who = purple_conversation_get_name(conv); |
3180 } | 3181 } |
3181 } else { | 3182 } else { |
3182 who = args[0]; | 3183 who = args[0]; |
3183 } | 3184 } |
3184 | 3185 |
3185 buddy = purple_find_buddy(conv->account, who); | 3186 buddy = purple_find_buddy(account, who); |
3186 if (buddy != NULL) | 3187 if (buddy != NULL) |
3187 alias = purple_buddy_get_contact_alias(buddy); | 3188 alias = purple_buddy_get_contact_alias(buddy); |
3188 else | 3189 else |
3189 alias = who; | 3190 alias = who; |
3190 | 3191 |
3572 | 3573 |
3573 static PurpleCmdRet | 3574 static PurpleCmdRet |
3574 jabber_cmd_mood(PurpleConversation *conv, | 3575 jabber_cmd_mood(PurpleConversation *conv, |
3575 const char *cmd, char **args, char **error, void *data) | 3576 const char *cmd, char **args, char **error, void *data) |
3576 { | 3577 { |
3577 JabberStream *js = purple_connection_get_protocol_data(conv->account->gc); | 3578 PurpleAccount *account = purple_conversation_get_account(conv); |
3579 JabberStream *js = purple_connection_get_protocol_data(account->gc); | |
3578 | 3580 |
3579 if (js->pep) { | 3581 if (js->pep) { |
3580 /* if no argument was given, unset mood */ | 3582 /* if no argument was given, unset mood */ |
3581 if (!args || !args[0]) { | 3583 if (!args || !args[0]) { |
3582 jabber_mood_set(js, NULL, NULL); | 3584 jabber_mood_set(js, NULL, NULL); |