1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 01:46:38 +02:00

Change (or delete) old sendto_ops() calls. Function is now gone.

This commit is contained in:
Bram Matthys
2021-09-23 19:14:10 +02:00
parent e36c85e4ce
commit b94707a51b
10 changed files with 37 additions and 69 deletions
+3 -2
View File
@@ -86,6 +86,7 @@ CMD_FUNC(cmd_sdesc)
sendto_server(client, 0, 0, NULL, ":%s SDESC :%s", client->name, parv[1]);
sendto_ops("Server description for %s is now '%s' (changed by %s)",
client->uplink->name, client->uplink->info, client->name);
unreal_log(ULOG_INFO, "sdesc", "SDESC_COMMAND", client,
"Server description for $server is now '$server.server.info' (changed by $client)",
log_data_client("server", client->uplink));
}
+8 -9
View File
@@ -310,11 +310,6 @@ CMD_FUNC(cmd_sjoin)
sj3_parabuf[0] = '\0';
for (i = 2; i <= (parc - 2); i++)
{
if (!parv[i])
{
sendto_ops("Got null parv in SJ3 code");
continue;
}
strlcat(sj3_parabuf, parv[i], sizeof sj3_parabuf);
if (((i + 1) <= (parc - 2)))
strlcat(sj3_parabuf, " ", sizeof sj3_parabuf);
@@ -348,8 +343,10 @@ CMD_FUNC(cmd_sjoin)
if (!end)
{
/* this obviously should never happen */
sendto_ops("Malformed SJOIN piece from %s for channel %s: %s",
client->name, channel->name, tp);
unreal_log(ULOG_WARNING, "sjoin", "SJOIN_INVALID_SJSBY", NULL,
"SJOIN for channel $channel has invalid SJSBY in item '$item' (from $client)",
log_data_channel("channel", channel),
log_data_string("item", s));
continue;
}
*end++ = '\0';
@@ -358,8 +355,10 @@ CMD_FUNC(cmd_sjoin)
if (!p)
{
/* missing setby parameter */
sendto_ops("Malformed SJOIN piece from %s for channel %s: %s",
client->name, channel->name, tp);
unreal_log(ULOG_WARNING, "sjoin", "SJOIN_INVALID_SJSBY", NULL,
"SJOIN for channel $channel has invalid SJSBY in item '$item' (from $client)",
log_data_channel("channel", channel),
log_data_string("item", s));
continue;
}
*p++ = '\0';
+4 -2
View File
@@ -67,7 +67,8 @@ CMD_FUNC(cmd_svsnoop)
if (parv[2][0] == '+')
{
SVSNOOP = 1;
sendto_ops("This server has been placed in NOOP mode");
unreal_log(ULOG_INFO, "svsnoop", "SVSNOOP_ENABLED", client,
"This server has been placed in NOOP mode (by $client) -- all IRCOp rights disabled");
list_for_each_entry(acptr, &client_list, client_node)
{
if (MyUser(acptr) && IsOper(acptr))
@@ -89,7 +90,8 @@ CMD_FUNC(cmd_svsnoop)
else
{
SVSNOOP = 0;
sendto_ops("This server is no longer in NOOP mode");
unreal_log(ULOG_INFO, "svsnoop", "SVSNOOP_ENABLED", client,
"This server is no longer in NOOP mode (by $client) -- IRCOps can oper up again");
}
}
}
+1
View File
@@ -73,4 +73,5 @@ CMD_FUNC(cmd_wallops)
}
sendto_ops_butone(client->direction, client, ":%s WALLOPS :%s", client->name, message);
// FIXME: move all that code to here and modularize +w
}
+11 -10
View File
@@ -283,11 +283,12 @@ int _watch_del(char *nick, Client *client, int flags)
* No error checking in ircd is unneccessary ;) -Cabal95
*/
if (!*lp)
sendto_ops("WATCH debug error: _watch_del "
"found a watch entry with no client "
"counterpoint processing nick %s on client %p!",
nick, client->user);
else {
{
unreal_log(ULOG_WARNING, "watch", "BUG_WATCH_DEL", client,
"[BUG] watch_del found a watch entry with no client counterpoint, "
"while processing nick $nick on client $client.details",
log_data_string("nick", nick));
} else {
prev = *lp;
*lp = prev->next;
free_link(prev);
@@ -334,11 +335,11 @@ int _watch_del_list(Client *client, int flags)
/* Not found, another "worst case" debug error */
if (!*lp)
sendto_ops("WATCH Debug error: _watch_del_list "
"found a WATCH entry with no table "
"counterpoint processing client %s!",
client->name);
else {
{
unreal_log(ULOG_WARNING, "watch", "BUG_WATCH_DEL_LIST", client,
"[BUG] watch_del_list found a watch entry with no table counterpoint, "
"while processing client $client.details");
} else {
/* Fix the watch-list and remove entry */
Link *prev = *lp;
*lp = prev->next;
+6 -2
View File
@@ -1123,8 +1123,12 @@ int websocket_create_packet(int opcode, char **buf, int *len)
if (bytes_in_sendbuf + bytes_single_frame > sizeof(sendbuf))
{
/* Overflow. This should never happen. */
sendto_ops("[websocket] [BUG] Overflow prevented: %d + %d > %d",
bytes_in_sendbuf, bytes_single_frame, (int)sizeof(sendbuf));
unreal_log(ULOG_WARNING, "websocket", "BUG_WEBSOCKET_OVERFLOW", NULL,
"[BUG] [websocket] Overflow prevented in websocket_create_packet(): "
"$bytes_in_sendbuf + $bytes_single_frame > $sendbuf_size",
log_data_integer("bytes_in_sendbuf", bytes_in_sendbuf),
log_data_integer("bytes_single_frame", bytes_single_frame),
log_data_integer("sendbuf_size", sizeof(sendbuf)));
return -1;
}