Mercurial > pidgin.yaz
annotate libpurple/protocols/oscar/userinfo.c @ 30815:47dfe1d54e9e
Fixed (I hope) #12284.
incomingim_ch2_icqserverrelay() was doing something it wasn't supposed to.
I suppose the packet format was reverse-engineered wrongly eons ago.
The correct packet format can be found at http://iserverd.khstu.ru/oscar/message.html
(and also in every open-source OSCAR client I could get my hands on).
The funny thing is that before #12284 showed up everything worked
right due to another bug. I'm too lazy to type out all the details,
so I'll just include a reference to my conversation with Mark Doliner:
http://www.pidgin.im/nopaste/102
author | ivan.komarov@soc.pidgin.im |
---|---|
date | Sat, 24 Jul 2010 18:14:29 +0000 |
parents | a347a4cd1caf |
children | ca90b6c27eb8 |
rev | line source |
---|---|
30794
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
1 /* |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
2 * Purple's oscar protocol plugin |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
3 * This file is the legal property of its developers. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
4 * Please see the AUTHORS file distributed alongside this file. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
5 * |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
6 * This library is free software; you can redistribute it and/or |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
9 * version 2 of the License, or (at your option) any later version. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
10 * |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
15 * |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
17 * License along with this library; if not, write to the Free Software |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
19 */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
20 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
21 /* |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
22 * Displaying various information about buddies. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
23 */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
24 |
30814
a347a4cd1caf
Moved encoding-related functions to a separate file, renamed some of them,
ivan.komarov@soc.pidgin.im
parents:
30795
diff
changeset
|
25 #include "encoding.h" |
30794
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
26 #include "oscar.h" |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
27 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
28 static gchar * |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
29 oscar_caps_to_string(guint64 caps) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
30 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
31 GString *str; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
32 const gchar *tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
33 guint64 bit = 1; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
34 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
35 str = g_string_new(""); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
36 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
37 if (!caps) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
38 return NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
39 } else while (bit <= OSCAR_CAPABILITY_LAST) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
40 if (bit & caps) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
41 switch (bit) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
42 case OSCAR_CAPABILITY_BUDDYICON: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
43 tmp = _("Buddy Icon"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
44 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
45 case OSCAR_CAPABILITY_TALK: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
46 tmp = _("Voice"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
47 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
48 case OSCAR_CAPABILITY_DIRECTIM: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
49 tmp = _("AIM Direct IM"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
50 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
51 case OSCAR_CAPABILITY_CHAT: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
52 tmp = _("Chat"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
53 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
54 case OSCAR_CAPABILITY_GETFILE: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
55 tmp = _("Get File"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
56 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
57 case OSCAR_CAPABILITY_SENDFILE: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
58 tmp = _("Send File"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
59 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
60 case OSCAR_CAPABILITY_GAMES: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
61 case OSCAR_CAPABILITY_GAMES2: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
62 tmp = _("Games"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
63 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
64 case OSCAR_CAPABILITY_XTRAZ: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
65 case OSCAR_CAPABILITY_NEWCAPS: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
66 tmp = _("ICQ Xtraz"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
67 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
68 case OSCAR_CAPABILITY_ADDINS: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
69 tmp = _("Add-Ins"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
70 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
71 case OSCAR_CAPABILITY_SENDBUDDYLIST: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
72 tmp = _("Send Buddy List"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
73 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
74 case OSCAR_CAPABILITY_ICQ_DIRECT: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
75 tmp = _("ICQ Direct Connect"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
76 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
77 case OSCAR_CAPABILITY_APINFO: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
78 tmp = _("AP User"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
79 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
80 case OSCAR_CAPABILITY_ICQRTF: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
81 tmp = _("ICQ RTF"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
82 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
83 case OSCAR_CAPABILITY_EMPTY: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
84 tmp = _("Nihilist"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
85 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
86 case OSCAR_CAPABILITY_ICQSERVERRELAY: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
87 tmp = _("ICQ Server Relay"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
88 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
89 case OSCAR_CAPABILITY_UNICODEOLD: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
90 tmp = _("Old ICQ UTF8"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
91 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
92 case OSCAR_CAPABILITY_TRILLIANCRYPT: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
93 tmp = _("Trillian Encryption"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
94 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
95 case OSCAR_CAPABILITY_UNICODE: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
96 tmp = _("ICQ UTF8"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
97 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
98 case OSCAR_CAPABILITY_HIPTOP: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
99 tmp = _("Hiptop"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
100 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
101 case OSCAR_CAPABILITY_SECUREIM: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
102 tmp = _("Security Enabled"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
103 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
104 case OSCAR_CAPABILITY_VIDEO: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
105 tmp = _("Video Chat"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
106 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
107 /* Not actually sure about this one... WinAIM doesn't show anything */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
108 case OSCAR_CAPABILITY_ICHATAV: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
109 tmp = _("iChat AV"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
110 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
111 case OSCAR_CAPABILITY_LIVEVIDEO: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
112 tmp = _("Live Video"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
113 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
114 case OSCAR_CAPABILITY_CAMERA: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
115 tmp = _("Camera"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
116 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
117 case OSCAR_CAPABILITY_ICHAT_SCREENSHARE: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
118 tmp = _("Screen Sharing"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
119 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
120 default: |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
121 tmp = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
122 break; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
123 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
124 if (tmp) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
125 g_string_append_printf(str, "%s%s", (*(str->str) == '\0' ? "" : ", "), tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
126 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
127 bit <<= 1; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
128 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
129 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
130 return g_string_free(str, FALSE); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
131 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
132 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
133 static void |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
134 oscar_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *name, const char *value) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
135 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
136 if (value && value[0]) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
137 purple_notify_user_info_add_pair(user_info, name, value); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
138 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
139 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
140 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
141 static void |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
142 oscar_user_info_convert_and_add(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
143 const char *name, const char *value) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
144 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
145 gchar *utf8; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
146 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
147 if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
148 purple_notify_user_info_add_pair(user_info, name, utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
149 g_free(utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
150 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
151 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
152 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
153 /** |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
154 * @brief Append the status information to a user_info struct |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
155 * |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
156 * The returned information is HTML-ready, appropriately escaped, as all information in a user_info struct should be HTML. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
157 * |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
158 * @param gc The PurpleConnection |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
159 * @param user_info A PurpleNotifyUserInfo object to which status information will be added |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
160 * @param b The PurpleBuddy whose status is desired. This or the aim_userinfo_t (or both) must be passed to oscar_user_info_append_status(). |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
161 * @param userinfo The aim_userinfo_t of the buddy whose status is desired. This or the PurpleBuddy (or both) must be passed to oscar_user_info_append_status(). |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
162 * @param strip_html_tags If strip_html_tags is TRUE, tags embedded in the status message will be stripped, returning a non-formatted string. The string will still be HTML escaped. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
163 */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
164 void |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
165 oscar_user_info_append_status(PurpleConnection *gc, PurpleNotifyUserInfo *user_info, PurpleBuddy *b, aim_userinfo_t *userinfo, gboolean strip_html_tags) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
166 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
167 PurpleAccount *account = purple_connection_get_account(gc); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
168 OscarData *od; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
169 PurplePresence *presence = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
170 PurpleStatus *status = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
171 gchar *message = NULL, *itmsurl = NULL, *tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
172 gboolean is_away; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
173 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
174 od = purple_connection_get_protocol_data(gc); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
175 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
176 if (b == NULL && userinfo == NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
177 return; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
178 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
179 if (b == NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
180 b = purple_find_buddy(purple_connection_get_account(gc), userinfo->bn); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
181 else |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
182 userinfo = aim_locate_finduserinfo(od, purple_buddy_get_name(b)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
183 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
184 if (b) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
185 presence = purple_buddy_get_presence(b); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
186 status = purple_presence_get_active_status(presence); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
187 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
188 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
189 /* If we have both b and userinfo we favor userinfo, because if we're |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
190 viewing someone's profile then we want the HTML away message, and |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
191 the "message" attribute of the status contains only the plaintext |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
192 message. */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
193 if (userinfo) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
194 if ((userinfo->flags & AIM_FLAG_AWAY) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
195 && userinfo->away_len > 0 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
196 && userinfo->away != NULL |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
197 && userinfo->away_encoding != NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
198 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
199 /* Away message */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
200 tmp = oscar_encoding_extract(userinfo->away_encoding); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
201 message = oscar_encoding_to_utf8(account, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
202 tmp, userinfo->away, userinfo->away_len); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
203 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
204 } else { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
205 /* |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
206 * Available message or non-HTML away message (because that's |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
207 * all we have right now. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
208 */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
209 if ((userinfo->status != NULL) && userinfo->status[0] != '\0') { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
210 message = oscar_encoding_to_utf8(account, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
211 userinfo->status_encoding, userinfo->status, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
212 userinfo->status_len); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
213 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
214 #if defined (_WIN32) || defined (__APPLE__) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
215 if (userinfo->itmsurl && (userinfo->itmsurl[0] != '\0')) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
216 itmsurl = oscar_encoding_to_utf8(account, userinfo->itmsurl_encoding, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
217 userinfo->itmsurl, userinfo->itmsurl_len); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
218 #endif |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
219 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
220 } else { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
221 message = g_strdup(purple_status_get_attr_string(status, "message")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
222 itmsurl = g_strdup(purple_status_get_attr_string(status, "itmsurl")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
223 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
224 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
225 is_away = ((status && !purple_status_is_available(status)) || |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
226 (userinfo && (userinfo->flags & AIM_FLAG_AWAY))); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
227 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
228 if (strip_html_tags) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
229 /* Away messages are HTML, but available messages were originally plain text. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
230 * We therefore need to strip away messages but not available messages if we're asked to remove HTML tags. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
231 */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
232 /* |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
233 * It seems like the above comment no longer applies. All messages need |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
234 * to be escaped. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
235 */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
236 if (message) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
237 gchar *tmp2; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
238 tmp = purple_markup_strip_html(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
239 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
240 tmp2 = g_markup_escape_text(tmp, -1); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
241 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
242 message = tmp2; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
243 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
244 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
245 } else { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
246 if (itmsurl) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
247 tmp = g_strdup_printf("<a href=\"%s\">%s</a>", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
248 itmsurl, message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
249 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
250 message = tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
251 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
252 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
253 g_free(itmsurl); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
254 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
255 if (message) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
256 tmp = oscar_util_format_string(message, purple_account_get_username(account)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
257 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
258 message = tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
259 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
260 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
261 if (b) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
262 if (purple_presence_is_online(presence)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
263 if (oscar_util_valid_name_icq(purple_buddy_get_name(b)) || is_away || !message || !(*message)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
264 /* Append the status name for online ICQ statuses, away AIM statuses, and for all buddies with no message. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
265 * If the status name and the message are the same, only show one. */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
266 const char *status_name = purple_status_get_name(status); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
267 if (status_name && message && !strcmp(status_name, message)) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
268 status_name = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
269 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
270 tmp = g_strdup_printf("%s%s%s", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
271 status_name ? status_name : "", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
272 ((status_name && message) && *message) ? ": " : "", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
273 (message && *message) ? message : ""); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
274 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
275 message = tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
276 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
277 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
278 } else if (aim_ssi_waitingforauth(od->ssi.local, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
279 aim_ssi_itemlist_findparentname(od->ssi.local, purple_buddy_get_name(b)), |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
280 purple_buddy_get_name(b))) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
281 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
282 /* Note if an offline buddy is not authorized */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
283 tmp = g_strdup_printf("%s%s%s", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
284 _("Not Authorized"), |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
285 (message && *message) ? ": " : "", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
286 (message && *message) ? message : ""); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
287 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
288 message = tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
289 } else { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
290 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
291 message = g_strdup(_("Offline")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
292 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
293 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
294 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
295 if (presence) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
296 const char *mood; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
297 const char *description; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
298 status = purple_presence_get_status(presence, "mood"); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
299 mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
300 description = icq_get_custom_icon_description(mood); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
301 if (description && *description) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
302 purple_notify_user_info_add_pair(user_info, _("Mood"), _(description)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
303 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
304 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
305 purple_notify_user_info_add_pair(user_info, _("Status"), message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
306 g_free(message); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
307 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
308 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
309 void |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
310 oscar_user_info_append_extra_info(PurpleConnection *gc, PurpleNotifyUserInfo *user_info, PurpleBuddy *b, aim_userinfo_t *userinfo) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
311 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
312 OscarData *od; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
313 PurpleAccount *account; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
314 PurplePresence *presence = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
315 PurpleStatus *status = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
316 PurpleGroup *g = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
317 struct buddyinfo *bi = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
318 char *tmp; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
319 const char *bname = NULL, *gname = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
320 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
321 od = purple_connection_get_protocol_data(gc); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
322 account = purple_connection_get_account(gc); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
323 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
324 if ((user_info == NULL) || ((b == NULL) && (userinfo == NULL))) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
325 return; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
326 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
327 if (userinfo == NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
328 userinfo = aim_locate_finduserinfo(od, purple_buddy_get_name(b)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
329 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
330 if (b == NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
331 b = purple_find_buddy(account, userinfo->bn); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
332 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
333 if (b != NULL) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
334 bname = purple_buddy_get_name(b); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
335 g = purple_buddy_get_group(b); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
336 gname = purple_group_get_name(g); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
337 presence = purple_buddy_get_presence(b); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
338 status = purple_presence_get_active_status(presence); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
339 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
340 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
341 if (userinfo != NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
342 bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(account, userinfo->bn)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
343 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
344 if ((bi != NULL) && (bi->ipaddr != 0)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
345 tmp = g_strdup_printf("%hhu.%hhu.%hhu.%hhu", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
346 (bi->ipaddr & 0xff000000) >> 24, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
347 (bi->ipaddr & 0x00ff0000) >> 16, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
348 (bi->ipaddr & 0x0000ff00) >> 8, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
349 (bi->ipaddr & 0x000000ff)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
350 oscar_user_info_add_pair(user_info, _("IP Address"), tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
351 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
352 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
353 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
354 if ((userinfo != NULL) && (userinfo->warnlevel != 0)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
355 tmp = g_strdup_printf("%d", (int)(userinfo->warnlevel/10.0 + .5)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
356 oscar_user_info_add_pair(user_info, _("Warning Level"), tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
357 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
358 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
359 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
360 if ((b != NULL) && (bname != NULL) && (g != NULL) && (gname != NULL)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
361 tmp = aim_ssi_getcomment(od->ssi.local, gname, bname); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
362 if (tmp != NULL) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
363 char *tmp2 = g_markup_escape_text(tmp, strlen(tmp)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
364 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
365 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
366 oscar_user_info_convert_and_add(account, od, user_info, _("Buddy Comment"), tmp2); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
367 g_free(tmp2); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
368 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
369 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
370 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
371 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
372 void |
30795
879baaf87aa2
Added an error handler for family_icq.c. So far it works for
ivan.komarov@soc.pidgin.im
parents:
30794
diff
changeset
|
373 oscar_user_info_display_error(OscarData *od, guint16 error_reason, gchar *buddy) |
30794
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
374 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
375 PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
376 gchar *buf = g_strdup_printf(_("User information not available: %s"), oscar_get_msgerr_reason(error_reason)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
377 purple_notify_user_info_add_pair(user_info, NULL, buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
378 purple_notify_userinfo(od->gc, buddy, user_info, NULL, NULL); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
379 purple_notify_user_info_destroy(user_info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
380 purple_conv_present_error(buddy, purple_connection_get_account(od->gc), buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
381 g_free(buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
382 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
383 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
384 void |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
385 oscar_user_info_display_icq(OscarData *od, struct aim_icq_info *info) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
386 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
387 PurpleConnection *gc = od->gc; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
388 PurpleAccount *account = purple_connection_get_account(gc); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
389 PurpleBuddy *buddy; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
390 struct buddyinfo *bi; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
391 gchar who[16]; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
392 PurpleNotifyUserInfo *user_info; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
393 gchar *utf8; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
394 gchar *buf; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
395 const gchar *alias; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
396 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
397 if (!info->uin) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
398 return; |
30795
879baaf87aa2
Added an error handler for family_icq.c. So far it works for
ivan.komarov@soc.pidgin.im
parents:
30794
diff
changeset
|
399 |
30794
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
400 user_info = purple_notify_user_info_new(); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
401 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
402 g_snprintf(who, sizeof(who), "%u", info->uin); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
403 buddy = purple_find_buddy(account, who); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
404 if (buddy != NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
405 bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(account, purple_buddy_get_name(buddy))); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
406 else |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
407 bi = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
408 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
409 purple_notify_user_info_add_pair(user_info, _("UIN"), who); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
410 oscar_user_info_convert_and_add(account, od, user_info, _("Nick"), info->nick); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
411 if ((bi != NULL) && (bi->ipaddr != 0)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
412 char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
413 (bi->ipaddr & 0xff000000) >> 24, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
414 (bi->ipaddr & 0x00ff0000) >> 16, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
415 (bi->ipaddr & 0x0000ff00) >> 8, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
416 (bi->ipaddr & 0x000000ff)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
417 purple_notify_user_info_add_pair(user_info, _("IP Address"), tstr); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
418 g_free(tstr); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
419 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
420 oscar_user_info_convert_and_add(account, od, user_info, _("First Name"), info->first); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
421 oscar_user_info_convert_and_add(account, od, user_info, _("Last Name"), info->last); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
422 if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(account, od, info->email))) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
423 buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
424 purple_notify_user_info_add_pair(user_info, _("Email Address"), buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
425 g_free(buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
426 g_free(utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
427 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
428 if (info->numaddresses && info->email2) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
429 int i; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
430 for (i = 0; i < info->numaddresses; i++) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
431 if (info->email2[i] && info->email2[i][0] && (utf8 = oscar_utf8_try_convert(account, od, info->email2[i]))) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
432 buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
433 purple_notify_user_info_add_pair(user_info, _("Email Address"), buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
434 g_free(buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
435 g_free(utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
436 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
437 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
438 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
439 oscar_user_info_convert_and_add(account, od, user_info, _("Mobile Phone"), info->mobile); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
440 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
441 if (info->gender != 0) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
442 purple_notify_user_info_add_pair(user_info, _("Gender"), (info->gender == 1 ? _("Female") : _("Male"))); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
443 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
444 if ((info->birthyear > 1900) && (info->birthmonth > 0) && (info->birthday > 0)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
445 /* Initialize the struct properly or strftime() will crash |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
446 * under some conditions (e.g. Debian sarge w/ LANG=en_HK). */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
447 time_t t = time(NULL); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
448 struct tm *tm = localtime(&t); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
449 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
450 tm->tm_mday = (int)info->birthday; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
451 tm->tm_mon = (int)info->birthmonth - 1; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
452 tm->tm_year = (int)info->birthyear - 1900; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
453 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
454 /* To be 100% sure that the fields are re-normalized. |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
455 * If you're sure strftime() ALWAYS does this EVERYWHERE, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
456 * feel free to remove it. --rlaager */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
457 mktime(tm); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
458 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
459 oscar_user_info_convert_and_add(account, od, user_info, _("Birthday"), purple_date_format_short(tm)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
460 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
461 if ((info->age > 0) && (info->age < 255)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
462 char age[5]; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
463 snprintf(age, sizeof(age), "%hhd", info->age); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
464 purple_notify_user_info_add_pair(user_info, _("Age"), age); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
465 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
466 if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(account, od, info->personalwebpage))) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
467 buf = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
468 purple_notify_user_info_add_pair(user_info, _("Personal Web Page"), buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
469 g_free(buf); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
470 g_free(utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
471 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
472 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
473 if (buddy != NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
474 oscar_user_info_append_status(gc, user_info, buddy, /* aim_userinfo_t */ NULL, /* strip_html_tags */ FALSE); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
475 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
476 oscar_user_info_convert_and_add(account, od, user_info, _("Additional Information"), info->info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
477 purple_notify_user_info_add_section_break(user_info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
478 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
479 if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
480 purple_notify_user_info_add_section_header(user_info, _("Home Address")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
481 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
482 oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->homeaddr); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
483 oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->homecity); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
484 oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->homestate); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
485 oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->homezip); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
486 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
487 if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
488 purple_notify_user_info_add_section_header(user_info, _("Work Address")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
489 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
490 oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->workaddr); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
491 oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->workcity); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
492 oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->workstate); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
493 oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->workzip); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
494 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
495 if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
496 purple_notify_user_info_add_section_header(user_info, _("Work Information")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
497 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
498 oscar_user_info_convert_and_add(account, od, user_info, _("Company"), info->workcompany); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
499 oscar_user_info_convert_and_add(account, od, user_info, _("Division"), info->workdivision); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
500 oscar_user_info_convert_and_add(account, od, user_info, _("Position"), info->workposition); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
501 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
502 if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(account, od, info->workwebpage))) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
503 char *webpage = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
504 purple_notify_user_info_add_pair(user_info, _("Web Page"), webpage); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
505 g_free(webpage); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
506 g_free(utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
507 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
508 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
509 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
510 if (buddy != NULL) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
511 alias = purple_buddy_get_alias(buddy); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
512 else |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
513 alias = who; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
514 purple_notify_userinfo(gc, who, user_info, NULL, NULL); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
515 purple_notify_user_info_destroy(user_info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
516 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
517 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
518 void |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
519 oscar_user_info_display_aim(OscarData *od, aim_userinfo_t *userinfo) |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
520 { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
521 PurpleConnection *gc = od->gc; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
522 PurpleAccount *account = purple_connection_get_account(gc); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
523 PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
524 gchar *tmp = NULL, *info_utf8 = NULL, *base_profile_url = NULL; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
525 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
526 oscar_user_info_append_status(gc, user_info, /* PurpleBuddy */ NULL, userinfo, /* strip_html_tags */ FALSE); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
527 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
528 if ((userinfo->present & AIM_USERINFO_PRESENT_IDLE) && userinfo->idletime != 0) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
529 tmp = purple_str_seconds_to_string(userinfo->idletime*60); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
530 oscar_user_info_add_pair(user_info, _("Idle"), tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
531 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
532 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
533 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
534 oscar_user_info_append_extra_info(gc, user_info, NULL, userinfo); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
535 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
536 if ((userinfo->present & AIM_USERINFO_PRESENT_ONLINESINCE) && !oscar_util_valid_name_sms(userinfo->bn)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
537 /* An SMS contact is always online; its Online Since value is not useful */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
538 time_t t = userinfo->onlinesince; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
539 oscar_user_info_add_pair(user_info, _("Online Since"), purple_date_format_full(localtime(&t))); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
540 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
541 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
542 if (userinfo->present & AIM_USERINFO_PRESENT_MEMBERSINCE) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
543 time_t t = userinfo->membersince; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
544 oscar_user_info_add_pair(user_info, _("Member Since"), purple_date_format_full(localtime(&t))); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
545 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
546 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
547 if (userinfo->capabilities != 0) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
548 tmp = oscar_caps_to_string(userinfo->capabilities); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
549 oscar_user_info_add_pair(user_info, _("Capabilities"), tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
550 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
551 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
552 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
553 /* Info */ |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
554 if ((userinfo->info_len > 0) && (userinfo->info != NULL) && (userinfo->info_encoding != NULL)) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
555 tmp = oscar_encoding_extract(userinfo->info_encoding); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
556 info_utf8 = oscar_encoding_to_utf8(account, tmp, userinfo->info, |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
557 userinfo->info_len); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
558 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
559 if (info_utf8 != NULL) { |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
560 tmp = oscar_util_format_string(info_utf8, purple_account_get_username(account)); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
561 purple_notify_user_info_add_section_break(user_info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
562 oscar_user_info_add_pair(user_info, _("Profile"), tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
563 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
564 g_free(info_utf8); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
565 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
566 } |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
567 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
568 purple_notify_user_info_add_section_break(user_info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
569 base_profile_url = oscar_util_valid_name_icq(userinfo->bn) ? "http://www.icq.com/people" : "http://profiles.aim.com"; |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
570 tmp = g_strdup_printf("<a href=\"%s/%s\">%s</a>", |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
571 base_profile_url, purple_normalize(account, userinfo->bn), _("View web profile")); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
572 purple_notify_user_info_add_pair(user_info, NULL, tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
573 g_free(tmp); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
574 |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
575 purple_notify_userinfo(gc, userinfo->bn, user_info, NULL, NULL); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
576 purple_notify_user_info_destroy(user_info); |
9881f18b95b1
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
ivan.komarov@soc.pidgin.im
parents:
diff
changeset
|
577 } |