126 |
|
} |
127 |
|
} |
128 |
|
|
129 |
< |
/* gotta read in the file, now */ |
130 |
< |
if ((file = fopen(motd->path, "r")) == NULL) |
129 |
> |
/* need the file's modification time */ |
130 |
> |
if (stat(motd->path, &sb) == -1) |
131 |
|
{ |
132 |
< |
ilog(LOG_TYPE_IRCD, "Couldn't open \"%s\": %s", motd->path, |
132 |
> |
ilog(LOG_TYPE_IRCD, "Couldn't stat \"%s\": %s", motd->path, |
133 |
|
strerror(errno)); |
134 |
|
return 0; |
135 |
|
} |
136 |
|
|
137 |
< |
/* need the file's modification time */ |
138 |
< |
if (stat(motd->path, &sb) == -1) |
137 |
> |
/* gotta read in the file, now */ |
138 |
> |
if ((file = fopen(motd->path, "r")) == NULL) |
139 |
|
{ |
140 |
< |
fclose(file); |
140 |
> |
ilog(LOG_TYPE_IRCD, "Couldn't open \"%s\": %s", motd->path, |
141 |
> |
strerror(errno)); |
142 |
|
return 0; |
143 |
|
} |
144 |
|
|