mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 19:43:13 +02:00
Newlog: convert sendto_realops() to unreal_log() in 9 files.
This commit is contained in:
@@ -206,12 +206,9 @@ CMD_OVERRIDE_FUNC(override_msg)
|
||||
score = lookalikespam_score(StripControlCodes(parv[2]));
|
||||
if ((score >= cfg.score) && !find_tkl_exception(TKL_ANTIMIXEDUTF8, client))
|
||||
{
|
||||
if (cfg.ban_action == BAN_ACT_KILL)
|
||||
{
|
||||
sendto_realops("[antimixedutf8] Killed connection from %s (score %d)",
|
||||
GetIP(client), score);
|
||||
} /* no else here!! */
|
||||
|
||||
unreal_log(ULOG_INFO, "antimixedutf8", "ANTIMIXEDUTF8_HIT", client,
|
||||
"[antimixedutf8] Client $client.details hit score $score -- taking action",
|
||||
log_data_integer("score", score));
|
||||
if ((cfg.ban_action == BAN_ACT_BLOCK) ||
|
||||
((cfg.ban_action == BAN_ACT_SOFT_BLOCK) && !IsLoggedIn(client)))
|
||||
{
|
||||
|
||||
@@ -1141,9 +1141,6 @@ EVENT(modef_event)
|
||||
/* Remove chanmode... */
|
||||
long mode = 0;
|
||||
Cmode_t extmode = 0;
|
||||
#ifdef NEWFLDDBG
|
||||
sendto_realops("modef_event: chan %s mode -%c EXPIRED", e->channel->name, e->m);
|
||||
#endif
|
||||
mode = get_mode_bitbychar(e->m);
|
||||
if (mode == 0)
|
||||
extmode = get_extmode_bitbychar(e->m);
|
||||
@@ -1167,11 +1164,6 @@ EVENT(modef_event)
|
||||
/* And delete... */
|
||||
DelListItem(e, removechannelmodetimer_list);
|
||||
safe_free(e);
|
||||
} else {
|
||||
#ifdef NEWFLDDBG
|
||||
sendto_realops("modef_event: chan %s mode -%c about %d seconds",
|
||||
e->channel->name, e->m, e->when - now);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -75,7 +75,8 @@ CMD_FUNC(cmd_close)
|
||||
}
|
||||
|
||||
sendnumeric(client, RPL_CLOSEEND, closed);
|
||||
sendto_realops("%s!%s@%s closed %d unknown connections", client->name,
|
||||
client->user->username, GetHost(client), closed);
|
||||
unreal_log(ULOG_INFO, "close", "CLOSED_CONNECTIONS", client,
|
||||
"$client.details closed $num_closed unknown connections",
|
||||
log_data_integer("num_closed", closed));
|
||||
irccounts.unknown = 0;
|
||||
}
|
||||
|
||||
@@ -439,9 +439,9 @@ int ct_pre_lconnect(Client *client)
|
||||
if (!ucounter->throttling_previous_minute && !ucounter->throttling_banner_displayed)
|
||||
{
|
||||
unreal_log(ULOG_WARNING, "connthrottle", "CONNTHROTLE_ACTIVATED", NULL,
|
||||
"[ConnThrottle] Connection throttling has been ACTIVATED due to a HIGH CONNECTION RATE.");
|
||||
sendto_realops("[ConnThrottle] Users with IP addresses that have not been seen before will be rejected above the set connection rate. Known users can still get in.");
|
||||
sendto_realops("[ConnThrottle] For more information see https://www.unrealircd.org/docs/ConnThrottle");
|
||||
"[ConnThrottle] Connection throttling has been ACTIVATED due to a HIGH CONNECTION RATE.\n"
|
||||
"Users with IP addresses that have not been seen before will be rejected above the set connection rate. Known users can still get in.\n"
|
||||
"or more information see https://www.unrealircd.org/docs/ConnThrottle");
|
||||
ucounter->throttling_banner_displayed = 1;
|
||||
}
|
||||
exit_client(client, NULL, cfg.reason);
|
||||
|
||||
@@ -243,8 +243,11 @@ int del_dccallow(Client *client, Client *optr)
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
sendto_realops("[BUG!] %s was in dccallowme list of %s but not in dccallowrem list!",
|
||||
optr->name, client->name);
|
||||
{
|
||||
unreal_log(LOG_WARNING, "dccallow", "BUG_DCCALLOW", client,
|
||||
"[BUG] DCCALLOW list for $client did not contain $target",
|
||||
log_data_client("target", optr));
|
||||
}
|
||||
|
||||
sendnumeric(client, RPL_DCCSTATUS, optr->name, "removed from");
|
||||
|
||||
|
||||
@@ -371,8 +371,10 @@ CMD_FUNC(cmd_dccdeny)
|
||||
|
||||
if (!find_deny_dcc(parv[1]))
|
||||
{
|
||||
sendto_ops("%s added a temp dccdeny for %s (%s)", client->name,
|
||||
parv[1], parv[2]);
|
||||
unreal_log(ULOG_INFO, "dccdeny", "DCCDENY_ADD", client,
|
||||
"[dccdeny] $client added a temporary DCCDENY for $file ($reason)",
|
||||
log_data_string("file", parv[1]),
|
||||
log_data_string("reason", parv[2]));
|
||||
DCCdeny_add(parv[1], parv[2], DCCDENY_HARD, CONF_BAN_TYPE_TEMPORARY);
|
||||
return;
|
||||
} else
|
||||
@@ -405,7 +407,10 @@ CMD_FUNC(cmd_undccdeny)
|
||||
|
||||
if ((d = find_deny_dcc(parv[1])) && d->flag.type2 == CONF_BAN_TYPE_TEMPORARY)
|
||||
{
|
||||
sendto_ops("%s removed a temp dccdeny for %s", client->name, parv[1]);
|
||||
unreal_log(ULOG_INFO, "dccdeny", "DCCDENY_DEL", client,
|
||||
"[dccdeny] $client removed a temporary DCCDENY for $file ($reason)",
|
||||
log_data_string("file", d->filename),
|
||||
log_data_string("reason", d->reason));
|
||||
DCCdeny_del(d);
|
||||
return;
|
||||
} else
|
||||
|
||||
@@ -595,7 +595,9 @@ int hbm_history_add(char *object, MessageTag *mtags, char *line)
|
||||
HistoryLogObject *h = hbm_find_or_add_object(object);
|
||||
if (!h->max_lines)
|
||||
{
|
||||
sendto_realops("hbm_history_add() for '%s', which has no limit", h->name);
|
||||
unreal_log(ULOG_WARNING, "history", "BUG_HISTORY_ADD_NO_LIMIT", NULL,
|
||||
"[BUG] hbm_history_add() called for $object, which has no limit set",
|
||||
log_data_string("object", h->name));
|
||||
#ifdef DEBUGMODE
|
||||
abort();
|
||||
#else
|
||||
|
||||
@@ -92,7 +92,8 @@ static int ident_lookup_connect(Client *client)
|
||||
}
|
||||
if (++OpenFiles >= maxclients+1)
|
||||
{
|
||||
sendto_ops("Can't allocate fd, too many connections.");
|
||||
unreal_log(ULOG_FATAL, "ident", "IDENT_ERROR_MAXCLIENTS", client,
|
||||
"Cannot do ident connection for $client.detail: All connections in use");
|
||||
fd_close(client->local->authfd);
|
||||
--OpenFiles;
|
||||
client->local->authfd = -1;
|
||||
|
||||
+9
-3
@@ -170,7 +170,12 @@ CMD_FUNC(cmd_join)
|
||||
int r;
|
||||
|
||||
if (bouncedtimes)
|
||||
sendto_realops("join: bouncedtimes=%d??? [please report at https://bugs.unrealircd.org/]", bouncedtimes);
|
||||
{
|
||||
unreal_log(ULOG_ERROR, "join", "BUG_JOIN_BOUNCEDTIMES", NULL,
|
||||
"[BUG] join: bouncedtimes is not initialized to zero ($bounced_times)!! "
|
||||
"Please report at https://bugs.unrealircd.org/",
|
||||
log_data_integer("bounced_times", bouncedtimes));
|
||||
}
|
||||
|
||||
bouncedtimes = 0;
|
||||
if (IsServer(client))
|
||||
@@ -485,8 +490,9 @@ void _do_join(Client *client, int parc, char *parv[])
|
||||
{
|
||||
if (d->warn)
|
||||
{
|
||||
sendto_snomask(SNO_EYES, "*** %s tried to join forbidden channel %s",
|
||||
get_client_name(client, 1), name);
|
||||
unreal_log(ULOG_INFO, "join", "JOIN_DENIED_FORBIDDEN_CHANNEL", client,
|
||||
"Client $client.details tried to join forbidden channel $channel",
|
||||
log_data_string("channel", name));
|
||||
}
|
||||
if (d->reason)
|
||||
sendnumeric(client, ERR_FORBIDDENCHANNEL, name, d->reason);
|
||||
|
||||
Reference in New Issue
Block a user