1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 18:23:12 +02:00

recoded ircd_log a bit

This commit is contained in:
codemastr
2001-04-13 22:38:37 +00:00
parent 155a99b69e
commit dea4e0f9b8
2 changed files with 5 additions and 8 deletions
+3 -8
View File
@@ -411,19 +411,14 @@ void ircd_log(int flags, char *format, ...)
strcat(buf, "\n");
sprintf(timebuf, "[%s] - ", myctime(TStime()));
for (logs = conf_log; logs; logs = (ConfigItem_log *) logs->next) {
fd = open(logs->file, O_CREAT|O_APPEND|O_WRONLY, S_IRUSR|S_IWUSR);
if (fd == -1)
continue;
if (logs->flags & flags) {
fd = open(logs->file, O_CREAT|O_APPEND|O_WRONLY, S_IRUSR|S_IWUSR);
if (fd == -1)
continue;
write(fd, timebuf, strlen(timebuf));
write(fd, buf, strlen(buf));
close(fd);
}
else
{
/* anti-codemastr(TM) coding */
close(fd);
}
}
va_end(ap);
}