mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 21:23:12 +02:00
Newlog: convert remaining sendto_ops_and_log()
This commit is contained in:
@@ -1080,8 +1080,10 @@ void floodprottimer_add(Channel *channel, char mflag, time_t when)
|
||||
{
|
||||
if (strlen(chp->timers_running)+1 >= sizeof(chp->timers_running))
|
||||
{
|
||||
sendto_ops_and_log("floodprottimer_add: too many timers running for %s (%s)!!!",
|
||||
channel->name, chp->timers_running);
|
||||
unreal_log(ULOG_WARNING, "flood", "BUG_FLOODPROTTIMER_ADD", NULL,
|
||||
"[BUG] floodprottimer_add: too many timers running for $channel ($timers_running)",
|
||||
log_data_channel("channel", channel),
|
||||
log_data_string("timers_running", chp->timers_running));
|
||||
return;
|
||||
}
|
||||
strccat(chp->timers_running, mflag); /* bounds already checked ^^ */
|
||||
|
||||
@@ -1504,9 +1504,10 @@ char *hbm_history_filename(HistoryLogObject *h)
|
||||
|
||||
#define WARN_WRITE_ERROR(fname) \
|
||||
do { \
|
||||
sendto_ops_and_log("[history] Error writing to temporary database file " \
|
||||
"'%s': %s (DATABASE NOT SAVED)", \
|
||||
fname, unrealdb_get_error_string()); \
|
||||
unreal_log(ULOG_ERROR, "history", "HISTORYDB_FILE_WRITE_ERROR", NULL, \
|
||||
"[historydb] Error writing to temporary database file $filename: $system_error", \
|
||||
log_data_string("filename", fname), \
|
||||
log_data_string("system_error", unrealdb_get_error_string())); \
|
||||
} while(0)
|
||||
|
||||
#define W_SAFE(x) \
|
||||
@@ -1584,7 +1585,7 @@ static int hbm_write_db(HistoryLogObject *h)
|
||||
#endif
|
||||
if (rename(tmpfname, realfname) < 0)
|
||||
{
|
||||
sendto_ops_and_log("[history] Error renaming '%s' to '%s': %s (HISTORY NOT SAVED)",
|
||||
config_error("[history] Error renaming '%s' to '%s': %s (HISTORY NOT SAVED)",
|
||||
tmpfname, realfname, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user