src/log.c

changeset 5205
242b8aa81328
parent 5138
fe19bf5d86e7
child 5211
94d9756c381f
equal deleted inserted replaced
5204:deed98aa3181 5205:242b8aa81328
293 293
294 if (why & OPT_LOG_MY_SIGNON) { 294 if (why & OPT_LOG_MY_SIGNON) {
295 switch (what) { 295 switch (what) {
296 case log_signon: 296 case log_signon:
297 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed on @ %s"), 297 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed on @ %s"),
298 gc->username, gc->prpl->name, full_date()); 298 gc->username, gc->prpl->info->name, full_date());
299 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 299 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
300 break; 300 break;
301 case log_signoff: 301 case log_signoff:
302 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed off @ %s"), 302 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed off @ %s"),
303 gc->username, gc->prpl->name, full_date()); 303 gc->username, gc->prpl->info->name, full_date());
304 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 304 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
305 break; 305 break;
306 case log_away: 306 case log_away:
307 g_snprintf(text, sizeof(text), _("+++ %s (%s) changed away state @ %s"), 307 g_snprintf(text, sizeof(text), _("+++ %s (%s) changed away state @ %s"),
308 gc->username, gc->prpl->name, full_date()); 308 gc->username, gc->prpl->info->name, full_date());
309 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 309 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
310 break; 310 break;
311 case log_back: 311 case log_back:
312 g_snprintf(text, sizeof(text), _("+++ %s (%s) came back @ %s"), 312 g_snprintf(text, sizeof(text), _("+++ %s (%s) came back @ %s"),
313 gc->username, gc->prpl->name, full_date()); 313 gc->username, gc->prpl->info->name, full_date());
314 g_snprintf(html, sizeof(html), "%s", text); 314 g_snprintf(html, sizeof(html), "%s", text);
315 break; 315 break;
316 case log_idle: 316 case log_idle:
317 g_snprintf(text, sizeof(text), _("+++ %s (%s) became idle @ %s"), 317 g_snprintf(text, sizeof(text), _("+++ %s (%s) became idle @ %s"),
318 gc->username, gc->prpl->name, full_date()); 318 gc->username, gc->prpl->info->name, full_date());
319 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 319 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
320 break; 320 break;
321 case log_unidle: 321 case log_unidle:
322 g_snprintf(text, sizeof(text), _("+++ %s (%s) returned from idle @ %s"), 322 g_snprintf(text, sizeof(text), _("+++ %s (%s) returned from idle @ %s"),
323 gc->username, gc->prpl->name, full_date()); 323 gc->username, gc->prpl->info->name, full_date());
324 g_snprintf(html, sizeof(html), "%s", text); 324 g_snprintf(html, sizeof(html), "%s", text);
325 break; 325 break;
326 case log_quit: 326 case log_quit:
327 g_snprintf(text, sizeof(text), _("+++ Program exit @ %s"), full_date()); 327 g_snprintf(text, sizeof(text), _("+++ Program exit @ %s"), full_date());
328 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 328 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
330 } 330 }
331 } else if (gaim_get_buddy_alias_only(who)) { 331 } else if (gaim_get_buddy_alias_only(who)) {
332 switch (what) { 332 switch (what) {
333 case log_signon: 333 case log_signon:
334 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed on @ %s"), 334 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed on @ %s"),
335 gc->username, gc->prpl->name, gaim_get_buddy_alias(who), who->name, full_date()); 335 gc->username, gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date());
336 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 336 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
337 break; 337 break;
338 case log_signoff: 338 case log_signoff:
339 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed off @ %s"), 339 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed off @ %s"),
340 gc->username, gc->prpl->name, gaim_get_buddy_alias(who), who->name, full_date()); 340 gc->username, gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date());
341 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 341 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
342 break; 342 break;
343 case log_away: 343 case log_away:
344 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) went away @ %s"), 344 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) went away @ %s"),
345 gc->username, gc->prpl->name, gaim_get_buddy_alias(who), who->name, full_date()); 345 gc->username, gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date());
346 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 346 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
347 break; 347 break;
348 case log_back: 348 case log_back:
349 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) came back @ %s"), 349 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) came back @ %s"),
350 gc->username, gc->prpl->name, gaim_get_buddy_alias(who), who->name, full_date()); 350 gc->username, gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date());
351 g_snprintf(html, sizeof(html), "%s", text); 351 g_snprintf(html, sizeof(html), "%s", text);
352 break; 352 break;
353 case log_idle: 353 case log_idle:
354 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) became idle @ %s"), 354 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) became idle @ %s"),
355 gc->username, gc->prpl->name, gaim_get_buddy_alias(who), who->name, full_date()); 355 gc->username, gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date());
356 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 356 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
357 break; 357 break;
358 case log_unidle: 358 case log_unidle:
359 g_snprintf(text, sizeof(text), 359 g_snprintf(text, sizeof(text),
360 _("%s (%s) reported that %s (%s) returned from idle @ %s"), gc->username, 360 _("%s (%s) reported that %s (%s) returned from idle @ %s"), gc->username,
361 gc->prpl->name, gaim_get_buddy_alias(who), who->name, full_date()); 361 gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date());
362 g_snprintf(html, sizeof(html), "%s", text); 362 g_snprintf(html, sizeof(html), "%s", text);
363 break; 363 break;
364 default: 364 default:
365 fclose(fd); 365 fclose(fd);
366 return; 366 return;
368 } 368 }
369 } else { 369 } else {
370 switch (what) { 370 switch (what) {
371 case log_signon: 371 case log_signon:
372 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed on @ %s"), 372 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed on @ %s"),
373 gc->username, gc->prpl->name, who->name, full_date()); 373 gc->username, gc->prpl->info->name, who->name, full_date());
374 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 374 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
375 break; 375 break;
376 case log_signoff: 376 case log_signoff:
377 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed off @ %s"), 377 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed off @ %s"),
378 gc->username, gc->prpl->name, who->name, full_date()); 378 gc->username, gc->prpl->info->name, who->name, full_date());
379 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 379 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
380 break; 380 break;
381 case log_away: 381 case log_away:
382 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s went away @ %s"), 382 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s went away @ %s"),
383 gc->username, gc->prpl->name, who->name, full_date()); 383 gc->username, gc->prpl->info->name, who->name, full_date());
384 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 384 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
385 break; 385 break;
386 case log_back: 386 case log_back:
387 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s came back @ %s"), 387 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s came back @ %s"),
388 gc->username, gc->prpl->name, who->name, full_date()); 388 gc->username, gc->prpl->info->name, who->name, full_date());
389 g_snprintf(html, sizeof(html), "%s", text); 389 g_snprintf(html, sizeof(html), "%s", text);
390 break; 390 break;
391 case log_idle: 391 case log_idle:
392 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s became idle @ %s"), 392 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s became idle @ %s"),
393 gc->username, gc->prpl->name, who->name, full_date()); 393 gc->username, gc->prpl->info->name, who->name, full_date());
394 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 394 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
395 break; 395 break;
396 case log_unidle: 396 case log_unidle:
397 g_snprintf(text, sizeof(text), 397 g_snprintf(text, sizeof(text),
398 _("%s (%s) reported that %s returned from idle @ %s"), gc->username, 398 _("%s (%s) reported that %s returned from idle @ %s"), gc->username,
399 gc->prpl->name, who->name, full_date()); 399 gc->prpl->info->name, who->name, full_date());
400 g_snprintf(html, sizeof(html), "%s", text); 400 g_snprintf(html, sizeof(html), "%s", text);
401 break; 401 break;
402 default: 402 default:
403 fclose(fd); 403 fclose(fd);
404 return; 404 return;

mercurial