Mercurial > pidgin.yaz
comparison plugins/filectl.c @ 5227:6d1707dc8c3d
[gaim-migrate @ 5597]
debug_printf -> gaim_debug
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 26 Apr 2003 17:36:52 +0000 |
parents | fefad67de2c7 |
children | c0baa01cdeda |
comparison
equal
deleted
inserted
replaced
5226:a2199ef77cbc | 5227:6d1707dc8c3d |
---|---|
33 | 33 |
34 file = fopen(filename, "r+"); | 34 file = fopen(filename, "r+"); |
35 while (fgets(buffer, sizeof buffer, file)) { | 35 while (fgets(buffer, sizeof buffer, file)) { |
36 if (buffer[strlen(buffer) - 1] == '\n') | 36 if (buffer[strlen(buffer) - 1] == '\n') |
37 buffer[strlen(buffer) - 1] = 0; | 37 buffer[strlen(buffer) - 1] = 0; |
38 debug_printf("read: %s\n", buffer); | 38 gaim_debug(GAIM_DEBUG_MISC, "filectl", "read: %s\n", buffer); |
39 command = getarg(buffer, 0, 0); | 39 command = getarg(buffer, 0, 0); |
40 if (!strncasecmp(command, "signon", 6)) { | 40 if (!strncasecmp(command, "signon", 6)) { |
41 struct gaim_account *account = NULL; | 41 struct gaim_account *account = NULL; |
42 GSList *accts = gaim_accounts; | 42 GSList *accts = gaim_accounts; |
43 arg1 = getarg(buffer, 1, 1); | 43 arg1 = getarg(buffer, 1, 1); |
157 | 157 |
158 sprintf(file, "%s/.gaim/control", getenv("HOME")); | 158 sprintf(file, "%s/.gaim/control", getenv("HOME")); |
159 | 159 |
160 if ((stat (file, &finfo) == 0) && (finfo.st_size > 0)) | 160 if ((stat (file, &finfo) == 0) && (finfo.st_size > 0)) |
161 if (mtime != finfo.st_mtime) { | 161 if (mtime != finfo.st_mtime) { |
162 debug_printf("control changed, checking\n"); | 162 gaim_debug(GAIM_DEBUG_INFO, "filectl", |
163 "control changed, checking\n"); | |
163 run_commands(); | 164 run_commands(); |
164 } | 165 } |
165 } | 166 } |
166 | 167 |
167 char *getarg(char *line, int which, int remain) { | 168 char *getarg(char *line, int which, int remain) { |