Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jab_iq.c @ 871:cb54c9d76853
Improve readability (/request {time,version})
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 25 May 2006 21:56:37 +0200 |
parents | 109dcf5fc111 |
children | 8bf36cef8aa6 |
comparison
equal
deleted
inserted
replaced
870:4b77a2ab18e5 | 871:cb54c9d76853 |
---|---|
263 p = xmlnode_get_tag_data(ansqry, "name"); | 263 p = xmlnode_get_tag_data(ansqry, "name"); |
264 if (p) { | 264 if (p) { |
265 p_noutf8 = from_utf8(p); | 265 p_noutf8 = from_utf8(p); |
266 if (p_noutf8) { | 266 if (p_noutf8) { |
267 buf = g_strdup_printf("Name: %s", p_noutf8); | 267 buf = g_strdup_printf("Name: %s", p_noutf8); |
268 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 268 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_NONE); |
269 g_free(p_noutf8); | 269 g_free(p_noutf8); |
270 g_free(buf); | 270 g_free(buf); |
271 } | 271 } |
272 } | 272 } |
273 p = xmlnode_get_tag_data(ansqry, "version"); | 273 p = xmlnode_get_tag_data(ansqry, "version"); |
274 if (p) { | 274 if (p) { |
275 p_noutf8 = from_utf8(p); | 275 p_noutf8 = from_utf8(p); |
276 if (p_noutf8) { | 276 if (p_noutf8) { |
277 buf = g_strdup_printf("Version: %s", p_noutf8); | 277 buf = g_strdup_printf("Version: %s", p_noutf8); |
278 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 278 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_NONE); |
279 g_free(p_noutf8); | 279 g_free(p_noutf8); |
280 g_free(buf); | 280 g_free(buf); |
281 } | 281 } |
282 } | 282 } |
283 p = xmlnode_get_tag_data(ansqry, "os"); | 283 p = xmlnode_get_tag_data(ansqry, "os"); |
284 if (p) { | 284 if (p) { |
285 p_noutf8 = from_utf8(p); | 285 p_noutf8 = from_utf8(p); |
286 if (p_noutf8) { | 286 if (p_noutf8) { |
287 buf = g_strdup_printf("OS: %s", p_noutf8); | 287 buf = g_strdup_printf("OS: %s", p_noutf8); |
288 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 288 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_NONE); |
289 g_free(p_noutf8); | 289 g_free(p_noutf8); |
290 g_free(buf); | 290 g_free(buf); |
291 } | 291 } |
292 } | 292 } |
293 } | 293 } |
339 p = xmlnode_get_tag_data(ansqry, "utc"); | 339 p = xmlnode_get_tag_data(ansqry, "utc"); |
340 if (p) { | 340 if (p) { |
341 p_noutf8 = from_utf8(p); | 341 p_noutf8 = from_utf8(p); |
342 if (p_noutf8) { | 342 if (p_noutf8) { |
343 buf = g_strdup_printf("UTC: %s", p_noutf8); | 343 buf = g_strdup_printf("UTC: %s", p_noutf8); |
344 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 344 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_NONE); |
345 g_free(p_noutf8); | 345 g_free(p_noutf8); |
346 g_free(buf); | 346 g_free(buf); |
347 } | 347 } |
348 } | 348 } |
349 p = xmlnode_get_tag_data(ansqry, "tz"); | 349 p = xmlnode_get_tag_data(ansqry, "tz"); |
350 if (p) { | 350 if (p) { |
351 p_noutf8 = from_utf8(p); | 351 p_noutf8 = from_utf8(p); |
352 if (p_noutf8) { | 352 if (p_noutf8) { |
353 buf = g_strdup_printf("TZ: %s", p_noutf8); | 353 buf = g_strdup_printf("TZ: %s", p_noutf8); |
354 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 354 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_NONE); |
355 g_free(p_noutf8); | 355 g_free(p_noutf8); |
356 g_free(buf); | 356 g_free(buf); |
357 } | 357 } |
358 } | 358 } |
359 p = xmlnode_get_tag_data(ansqry, "display"); | 359 p = xmlnode_get_tag_data(ansqry, "display"); |
360 if (p) { | 360 if (p) { |
361 p_noutf8 = from_utf8(p); | 361 p_noutf8 = from_utf8(p); |
362 if (p_noutf8) { | 362 if (p_noutf8) { |
363 buf = g_strdup_printf("Time: %s", p_noutf8); | 363 buf = g_strdup_printf("Time: %s", p_noutf8); |
364 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_INFO); | 364 scr_WriteIncomingMessage(bjid, buf, 0, HBB_PREFIX_NONE); |
365 g_free(p_noutf8); | 365 g_free(p_noutf8); |
366 g_free(buf); | 366 g_free(buf); |
367 } | 367 } |
368 } | 368 } |
369 } | 369 } |