mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-27 04:56:37 +02:00
Remove ircd_log(), use unreal_log() instead!
This commit is contained in:
@@ -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 *);
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
-19
@@ -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)
|
||||
{
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user