comparison src/log.c @ 5205:fefad67de2c7

[gaim-migrate @ 5573] I had a damn good commit message, but it was eaten. Let's try it again. Announcing, Gaim Plugin API version 2.0, or GPAPIV2.0 for short. There are lots'a cool thingies here. Okay now, this isn't as cool as the previous message, but: 1) There's now a single entry function for all plugin types. It returns a detailed information structure on the plugin. This removes a lot of the ugliness from old plugins. Oh yeah, libicq wasn't converted to this, so if you use it, well, you shouldn't have used it anyway, but now you can't! bwahahaha. Use AIM/ICQ. 2) There are now 3 types of plugins: Standard, Loader, and Protocol plugins. Standard plugins are, well, standard, compiled plugins. Loader plugins load other plugins. For example, the perl support is now a loader plugin. It loads perl scripts. In the future, we'll have Ruby and Python loader plugins. Protocol plugins are, well, protocol plugins... yeah... 3) Plugins have unique IDs, so they can be referred to or automatically updated from a plugin database in the future. Neat, huh? 4) Plugins will have dependency support in the future, and can be hidden, so if you have, say, a logging core plugin, it won't have to show up, but then you load the GTK+ logging plugin and it'll auto-load the core plugin. Core/UI split plugins! 5) There will eventually be custom plugin signals and RPC of some sort, for the core/ui split plugins. So, okay, back up .gaimrc. I'd like to thank my parents for their support, javabsp for helping convert a bunch of protocol plugins, and Etan for helping convert a bunch of standard plugins. Have fun. If you have any problems, please let me know, but you probably won't have anything major happen. You will have to convert your plugins, though, and I'm not guaranteeing that all perl scripts will still work. I'll end up changing the perl script API eventually, so I know they won't down the road. Don't worry, though. It'll be mass cool. faceprint wants me to just commit the damn code already. So, here we go!!! .. .. I need a massage. From a young, cute girl. Are there any young, cute girls in the audience? IM me plz k thx. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 25 Apr 2003 06:47:33 +0000
parents 5425bbaa2630
children 0241d6b6702d
comparison
equal deleted inserted replaced
5204:44de70702205 5205:fefad67de2c7
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;