diff --git a/include/h.h b/include/h.h index 5e3b62c76..28377e1f8 100644 --- a/include/h.h +++ b/include/h.h @@ -184,7 +184,6 @@ extern char *extban_conv_param_nuh(char *); extern Ban *is_banned(Client *, Channel *, int, char **, char **); extern Ban *is_banned_with_nick(Client *, Channel *, int, char *, char **, char **); -extern void ircd_log(int, FORMAT_STRING(const char *), ...) __attribute__((format(printf,2,3))); extern Client *find_client(char *, Client *); extern Client *find_name(char *, Client *); extern Client *find_nickserv(char *, Client *); diff --git a/include/modules.h b/include/modules.h index bbe291af0..5883e18d2 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1741,7 +1741,7 @@ int hooktype_tkl_add(Client *client, TKL *tkl); */ int hooktype_tkl_del(Client *client, TKL *tkl); -/** Called when something is logged via the ircd_log() function (function prototype for HOOKTYPE_LOG). +/** Called when something is logged via the unreal_log() function (function prototype for HOOKTYPE_LOG). * @param flags One of LOG_*, such as LOG_ERROR. * @param timebuf The time buffer, such as "[2030-01-01 12:00:00]" * @param buf The text to be logged diff --git a/src/misc.c b/src/misc.c index 590e20253..6ff7dc057 100644 --- a/src/misc.c +++ b/src/misc.c @@ -98,25 +98,6 @@ SpamfilterTargetTable spamfiltertargettable[] = { /** IRC Statistics (quite useless?) */ struct IRCStatistics ircstats; -/** Main IRCd logging function. - * @param flags One of LOG_* (eg: LOG_ERROR) - * @param format Format string - * @param ... Arguments - * @note This function is safe to call at all times. It provides - * protection against recursion. - */ -void ircd_log(int flags, FORMAT_STRING(const char *format), ...) -{ - va_list vl; - char buf[2048]; - - va_start(vl, format); - ircvsnprintf(buf, sizeof(buf), format, vl); - va_end(vl); - - unreal_log_raw(ULOG_ERROR, "unknown", "UNKNOWN", NULL, buf); -} - /** Returns the date in rather long string */ char *long_date(time_t clock) { diff --git a/src/send.c b/src/send.c index 44b673f26..34b93f043 100644 --- a/src/send.c +++ b/src/send.c @@ -789,8 +789,8 @@ void sendto_ops_and_log(FORMAT_STRING(const char *pattern), ...) ircvsnprintf(buf, sizeof(buf), pattern, vl); va_end(vl); - ircd_log(LOG_ERROR, "%s", buf); sendto_umode(UMODE_OPER, "%s", buf); + unreal_log_raw(ULOG_ERROR, "unknown", "UNKNOWN", NULL, buf); } /** Send a message to all locally connected users with specified user mode.