mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-28 11:56:37 +02:00
Change (or delete) old sendto_ops() calls. Function is now gone.
This commit is contained in:
+1
-3
@@ -2156,10 +2156,8 @@ int config_test(void)
|
||||
|
||||
if (old_pid_file && strcmp(old_pid_file, conf_files->pid_file))
|
||||
{
|
||||
sendto_ops("pidfile is being rewritten to %s, please delete %s",
|
||||
conf_files->pid_file,
|
||||
old_pid_file);
|
||||
write_pidfile();
|
||||
unlink(old_pid_file);
|
||||
}
|
||||
safe_free(old_pid_file);
|
||||
|
||||
|
||||
+3
-2
@@ -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
@@ -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';
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -758,10 +758,6 @@ static void remove_unknown(Client *client, char *sender)
|
||||
if (!IsServer(client))
|
||||
return;
|
||||
|
||||
#ifdef DEVELOP
|
||||
sendto_ops("Killing %s (%s)", sender, backupbuf);
|
||||
return;
|
||||
#endif
|
||||
/*
|
||||
* Do kill if it came from a server because it means there is a ghost
|
||||
* user on the other server which needs to be removed. -avalon
|
||||
|
||||
-28
@@ -701,34 +701,6 @@ void sendto_match_butone(Client *one, Client *from, const char *mask, int what,
|
||||
}
|
||||
}
|
||||
|
||||
/** Send a message to all locally connected IRCOps
|
||||
* @param pattern The format string / pattern to use.
|
||||
* @param ... Format string parameters.
|
||||
*/
|
||||
void sendto_ops(FORMAT_STRING(const char *pattern), ...)
|
||||
{
|
||||
va_list vl;
|
||||
Client *acptr;
|
||||
char nbuf[1024];
|
||||
|
||||
list_for_each_entry(acptr, &oper_list, special_node)
|
||||
{
|
||||
if (!IsServer(acptr) && !IsMe(acptr) && acptr->user->snomask)
|
||||
{
|
||||
ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :*** ", me.name, acptr->name);
|
||||
strlcat(nbuf, pattern, sizeof nbuf);
|
||||
|
||||
va_start(vl, pattern);
|
||||
vsendto_one(acptr, NULL, nbuf, vl);
|
||||
va_end(vl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Hmm.. so local sending is called sendto_ops() and local+remote is sendto_ops_butone(),
|
||||
* that is weird naming... (TODO fix some day in a new major series)
|
||||
*/
|
||||
|
||||
/** Send a message to all IRCOps (local and remote), except one.
|
||||
* @param one Skip sending the message to this client/direction
|
||||
* @param from The sender (can not be NULL)
|
||||
|
||||
+3
-9
@@ -1093,16 +1093,10 @@ int deliver_it(Client *client, char *str, int len, int *want_read)
|
||||
|
||||
*want_read = 0;
|
||||
|
||||
if (IsDeadSocket(client) || (!IsServer(client) && !IsUser(client)
|
||||
&& !IsHandshake(client)
|
||||
&& !IsTLSHandshake(client)
|
||||
|
||||
&& !IsUnknown(client)))
|
||||
if (IsDeadSocket(client) ||
|
||||
(!IsServer(client) && !IsUser(client) && !IsHandshake(client) &&
|
||||
!IsTLSHandshake(client) && !IsUnknown(client)))
|
||||
{
|
||||
str[len] = '\0';
|
||||
sendto_ops
|
||||
("* * * DEBUG ERROR * * * !!! Calling deliver_it() for %s, status %d %s, with message: %s",
|
||||
client->name, client->status, IsDeadSocket(client) ? "DEAD" : "", str);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user