comparison src/util.c @ 3457:222e23f91092

[gaim-migrate @ 3505] Deryni made it so we can all log chats and IMs seperately. He had it retain your old option--it would log both if you had it configured that way. I made it so that if you had logging on it will log IMs--but you'll have to turn on logging chats manually. So if you want to log chats, turn that on. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 28 Aug 2002 05:55:48 +0000
parents 8fa61405af2b
children 7a3f16a375a5
comparison
equal deleted inserted replaced
3456:b48065e52337 3457:222e23f91092
398 g_free(buf2); 398 g_free(buf2);
399 g_free(gaim_dir); 399 g_free(gaim_dir);
400 return fd; 400 return fd;
401 } 401 }
402 402
403 FILE *open_log_file(char *name) 403 FILE *open_log_file(char *name, int is_chat)
404 { 404 {
405 struct stat st; 405 struct stat st;
406 char realname[256]; 406 char realname[256];
407 struct log_conversation *l; 407 struct log_conversation *l;
408 FILE *fd; 408 FILE *fd;
409 int flag = 0; 409 int flag = 0;
410 410
411 if (!(logging_options & OPT_LOG_ALL)) { 411 if (((is_chat == 2) && !(logging_options & OPT_LOG_INDIVIDUAL))
412 || ((is_chat == 1) && !(logging_options & OPT_LOG_CHATS))
413 || ((is_chat == 0) && !(logging_options & OPT_LOG_CONVOS))) {
412 414
413 l = find_log_info(name); 415 l = find_log_info(name);
414 if (!l) 416 if (!l)
415 return NULL; 417 return NULL;
416 418
451 FILE *open_system_log_file(char *name) 453 FILE *open_system_log_file(char *name)
452 { 454 {
453 int x; 455 int x;
454 456
455 if (name) 457 if (name)
456 return open_log_file(name); 458 return open_log_file(name, 2);
457 else 459 else
458 return open_gaim_log_file("system", &x); 460 return open_gaim_log_file("system", &x);
459 } 461 }
460 462
461 char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" "0123456789+/"; 463 char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" "0123456789+/";