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

Remove sendto_ops_and_log(), use unreal_log() instead!

This commit is contained in:
Bram Matthys
2021-08-11 19:10:30 +02:00
parent edfd0d434f
commit a94017c731
3 changed files with 2 additions and 19 deletions
-1
View File
@@ -268,7 +268,6 @@ extern void sendnotice(Client *to, FORMAT_STRING(const char *pattern), ...) __at
extern void sendnumeric(Client *to, int numeric, ...);
extern void sendnumericfmt(Client *to, int numeric, FORMAT_STRING(const char *pattern), ...) __attribute__((format(printf,3,4)));
extern void sendto_server(Client *one, unsigned long caps, unsigned long nocaps, MessageTag *mtags, FORMAT_STRING(const char *format), ...) __attribute__((format(printf, 5, 6)));
extern void sendto_ops_and_log(FORMAT_STRING(const char *pattern), ...) __attribute__((format(printf,1,2)));
extern MODVAR int writecalls, writeb[];
extern int deliver_it(Client *cptr, char *str, int len, int *want_read);
-17
View File
@@ -782,23 +782,6 @@ void sendto_realops(FORMAT_STRING(const char *pattern), ...)
}
}
/** Send a message to all locally connected IRCOps and also log the error.
* @param pattern The format string / pattern to use.
* @param ... Format string parameters.
*/
void sendto_ops_and_log(FORMAT_STRING(const char *pattern), ...)
{
va_list vl;
char buf[1024];
va_start(vl, pattern);
ircvsnprintf(buf, sizeof(buf), pattern, vl);
va_end(vl);
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.
* @param umodes The umode that the recipient should have set (one of UMODE_)
* @param pattern The format string / pattern to use.
+2 -1
View File
@@ -1332,7 +1332,8 @@ void start_server_handshake(Client *client)
if (!aconf)
{
/* Should be impossible. */
sendto_ops_and_log("Lost configuration for %s in start_server_handshake()", get_client_name(client, FALSE));
unreal_log(LOG_ERROR, "link", "BUG_LOST_CONFIGURATION_ON_HANDSHAKE", client,
"Lost configuration while connecting to $client.details");
return;
}