Changeset 65ad073 for zephyr.c


Ignore:
Timestamp:
Jun 4, 2003, 11:14:41 AM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ae4cd12
Parents:
6a415e9
Message:
'addbuddy zephyr <user>' and 'delbuddy zephyr <user>' now work.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    r31e48a3 r65ad073  
    607607}
    608608
     609void owl_zephyr_addbuddy(char *name)
     610{
     611  char *filename;
     612  FILE *file;
     613 
     614  filename=owl_sprintf("%s/.anyone", owl_global_get_homedir(&g));
     615  file=fopen(filename, "a");
     616  owl_free(filename);
     617  if (!file) {
     618    owl_function_makemsg("Error opening zephyr buddy file for append");
     619    return;
     620  }
     621  fprintf(file, "%s\n", name);
     622  fclose(file);
     623}
     624
     625void owl_zephyr_delbuddy(char *name)
     626{
     627  char *filename;
     628
     629  filename=owl_sprintf("%s/.anyone", owl_global_get_homedir(&g));
     630  owl_util_file_deleteline(filename, name, 0);
     631  owl_free(filename);
     632}
Note: See TracChangeset for help on using the changeset viewer.