112 |
|
if (logFile == NULL) |
113 |
|
return; |
114 |
|
|
115 |
– |
#ifdef _WIN32 |
116 |
– |
nbytes = snprintf(buf, sizeof(buf), "[%s] %s\r\n", |
117 |
– |
#else |
115 |
|
nbytes = snprintf(buf, sizeof(buf), "[%s] %s\n", |
119 |
– |
#endif |
116 |
|
smalldate(CurrentTime), message); |
117 |
+ |
|
118 |
|
fbputs(buf, logFile, nbytes); |
119 |
|
} |
120 |
|
|
202 |
|
#ifdef SYSLOG_USERS |
203 |
|
if (IsClient(source_p)) |
204 |
|
{ |
205 |
< |
ilog(L_INFO, "%s (%3ld:%02ld:%02ld): %s!%s@%s %llu/%llu\n", |
206 |
< |
myctime(source_p->firsttime), |
207 |
< |
(signed long) on_for / 3600, |
208 |
< |
(signed long) (on_for % 3600)/60, |
209 |
< |
(signed long) on_for % 60, |
210 |
< |
source_p->name, source_p->username, source_p->host, |
214 |
< |
source_p->localClient->send.bytes>>10, |
215 |
< |
source_p->localClient->recv.bytes>>10); |
205 |
> |
ilog(L_INFO, "%s (%3u:%02u:%02u): %s!%s@%s %llu/%llu", |
206 |
> |
myctime(source_p->firsttime), (unsigned int)(on_for / 3600), |
207 |
> |
(unsigned int)((on_for % 3600)/60), (unsigned int)(on_for % 60), |
208 |
> |
source_p->name, source_p->username, source_p->host, |
209 |
> |
source_p->localClient->send.bytes>>10, |
210 |
> |
source_p->localClient->recv.bytes>>10); |
211 |
|
} |
212 |
|
#else |
213 |
|
{ |
234 |
|
if (user_log_fb != NULL) |
235 |
|
{ |
236 |
|
size_t nbytes = ircsprintf(linebuf, |
237 |
< |
"%s (%3ld:%02ld:%02ld): %s!%s@%s %llu/%llu\n", |
237 |
> |
"%s (%3u:%02u:%02u): %s!%s@%s %llu/%llu\n", |
238 |
|
myctime(source_p->firsttime), |
239 |
< |
(signed long) on_for / 3600, |
240 |
< |
(signed long) (on_for % 3600)/60, |
241 |
< |
(signed long) on_for % 60, |
239 |
> |
(unsigned int)(on_for / 3600), |
240 |
> |
(unsigned int)((on_for % 3600)/60), |
241 |
> |
(unsigned int)(on_for % 60), |
242 |
|
source_p->name, source_p->username, source_p->host, |
243 |
|
source_p->localClient->send.bytes>>10, |
244 |
|
source_p->localClient->recv.bytes>>10); |