Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

make more snotes netwide #363

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions extensions/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ setfilter(const char *check, const char *data, const char **error)

if (!strcasecmp(data, "disable")) {
filter_enable = 0;
sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Filtering disabled.");
return 0;
}
if (!strcasecmp(data, "enable")) {
filter_enable = 1;
sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Filtering enabled.");
return 0;
}
Expand Down Expand Up @@ -217,7 +217,7 @@ setfilter(const char *check, const char *data, const char **error)
}
state = FILTER_LOADED;
filter_db = db;
sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"New filters loaded.");
rb_free(filter_data);
filter_data = 0;
Expand Down Expand Up @@ -408,7 +408,7 @@ filter_msg_user(void *data_)
data->approved = 1;
}
if (r & ACT_ALARM) {
sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"FILTER: %s!%s@%s [%s]",
s->name, s->username, s->host, s->sockhost);
}
Expand Down Expand Up @@ -449,7 +449,7 @@ filter_msg_channel(void *data_)
data->approved = 1;
}
if (r & ACT_ALARM) {
sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"FILTER: %s!%s@%s [%s]",
s->name, s->username, s->host, s->sockhost);
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/hurt.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ heal_nick(struct Client *source_p, struct Client *target_p)
{
if (rb_dlinkFindDestroy(target_p, &hurt_state.hurt_clients))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s used HEAL on %s",
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s used HEAL on %s",
get_oper_name(source_p), get_client_name(target_p, HIDE_IP));
sendto_one_notice(target_p, ":HURT restriction temporarily removed by operator");
sendto_one_notice(source_p, ":HURT restriction on %s temporarily removed", target_p->name);
Expand Down
2 changes: 1 addition & 1 deletion extensions/sasl_usercloak.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ check_new_user(void *vdata)
return;
}

sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"KLINE active for %s",
get_client_name(source_p, HIDE_IP));

Expand Down
2 changes: 1 addition & 1 deletion extensions/spy_admin_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DECLARE_MODULE_AV2(admin_spy, NULL, NULL, NULL, NULL, admin_hfnlist, NULL, NULL,
void
show_admin(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"admin requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
2 changes: 1 addition & 1 deletion extensions/spy_info_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DECLARE_MODULE_AV2(info_spy, NULL, NULL, NULL, NULL, info_hfnlist, NULL, NULL, s
void
show_info(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"info requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
2 changes: 1 addition & 1 deletion extensions/spy_links_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ show_links(hook_data *data)
{
const char *mask = data->arg1;

sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"LINKS '%s' requested by %s (%s@%s) [%s]",
mask, data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
2 changes: 1 addition & 1 deletion extensions/spy_motd_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DECLARE_MODULE_AV2(motd_spy, NULL, NULL, NULL, NULL, motd_hfnlist, NULL, NULL, s
void
show_motd(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"motd requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
6 changes: 3 additions & 3 deletions extensions/spy_stats_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ show_stats(hook_data_int *data)
const char *name = data->arg1;

if(!EmptyString(name))
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"STATS %c requested by %s (%s@%s) [%s] on %s",
statchar, data->client->name,
data->client->username,
data->client->host,
data->client->servptr->name, name);
else
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name,
data->client->username,
data->client->host, data->client->servptr->name);
}
else
{
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
2 changes: 1 addition & 1 deletion extensions/spy_stats_p_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ DECLARE_MODULE_AV2(stats_p_spy, NULL, NULL, NULL, NULL, stats_p_hfnlist, NULL, N
void
show_stats_p(hook_data *data)
{
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"STATS p requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
4 changes: 2 additions & 2 deletions extensions/spy_trace_notice.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ void
show_trace(hook_data_client *data)
{
if(data->target)
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"trace requested by %s (%s@%s) [%s] on %s",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name,
data->target->name);
else
sendto_realops_snomask(SNO_SPY, L_ALL,
sendto_realops_snomask(SNO_SPY, L_NETWIDE,
"trace requested by %s (%s@%s) [%s]",
data->client->name, data->client->username,
data->client->host, data->client->servptr->name);
Expand Down
6 changes: 3 additions & 3 deletions ircd/authproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ start_authd(void)
{
ierror("Unable to execute authd in %s or %s/bin",
ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Unable to execute authd in %s or %s/bin",
ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
return 1;
Expand All @@ -127,12 +127,12 @@ start_authd(void)
if(authd_helper == NULL)
{
ierror("Unable to start authd helper: %s", strerror(errno));
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Unable to start authd helper: %s", strerror(errno));
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Unable to start authd helper: %s", strerror(errno));
return 1;
}

ilog(L_MAIN, "authd helper started");
sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd helper started");
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd helper started");
rb_helper_run(authd_helper);
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions ircd/bandbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ start_bandb(void)
if(bandb_helper == NULL)
{
ilog(L_MAIN, "Unable to start bandb: %s", strerror(errno));
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Unable to start bandb: %s",
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Unable to start bandb: %s",
strerror(errno));
return 1;
}
Expand Down Expand Up @@ -390,7 +390,7 @@ bandb_handle_failure(rb_helper *helper, char **parv, int parc)
fprintf(stderr, "bandb - bandb failure: %s\n", parv[1]);

ilog(L_MAIN, "bandb - bandb failure: %s", parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "bandb - bandb failure: %s", parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "bandb - bandb failure: %s", parv[1]);
exit(1);
}

Expand Down Expand Up @@ -441,7 +441,7 @@ static void
bandb_restart_cb(rb_helper *helper)
{
ilog(L_MAIN, "bandb - bandb_restart_cb called, bandb helper died?");
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"bandb - bandb_restart_cb called, bandb helper died?");
if(helper != NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion ircd/chmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
break;

default:
sendto_realops_snomask(SNO_GENERAL, L_ALL, "chm_ban() called with unknown type!");
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "chm_ban() called with unknown type!");
return;
}

Expand Down
18 changes: 9 additions & 9 deletions ircd/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ check_pings_list(rb_dlink_list * list)
{
if(IsServer(client_p))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"No response from %s, closing link",
client_p->name);
ilog(L_SERVER,
Expand Down Expand Up @@ -466,7 +466,7 @@ check_unknowns_list(rb_dlink_list * list)
{
if(IsAnyServer(client_p))
{
sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) ? L_NETWIDE : L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"No response from %s, closing link",
client_p->name);
ilog(L_SERVER,
Expand Down Expand Up @@ -548,7 +548,7 @@ check_klines(void)
{
if(IsExemptKline(client_p))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"KLINE over-ruled for %s, client is kline_exempt [%s@%s]",
get_client_name(client_p, HIDE_IP),
aconf->user, aconf->host);
Expand Down Expand Up @@ -722,7 +722,7 @@ check_xlines(void)
{
if(IsExemptKline(client_p))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"XLINE over-ruled for %s, client is kline_exempt [%s]",
get_client_name(client_p, HIDE_IP),
aconf->host);
Expand Down Expand Up @@ -772,11 +772,11 @@ resv_nick_fnc(const char *mask, const char *reason, int temp_time)
nick = client_p->id;

/* Tell opers. */
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"RESV forced nick change for %s!%s@%s to %s; nick matched [%s] (%s)",
client_p->name, client_p->username, client_p->host, nick, mask, reason);

sendto_realops_snomask(SNO_NCHANGE, L_ALL,
sendto_realops_snomask(SNO_NCHANGE, L_NETWIDE,
"Nick change: From %s to %s [%s@%s]",
client_p->name, nick, client_p->username, client_p->host);

Expand Down Expand Up @@ -1301,7 +1301,7 @@ exit_aborted_clients(void *unused)
rb_dlinkDelete(ptr, &abort_list);

if(IsAnyServer(abt->client))
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Closing link to %s: %s",
abt->client->name, abt->notice);

Expand Down Expand Up @@ -2135,7 +2135,7 @@ error_exit_client(struct Client *client_p, int error)
{
if(error == 0)
{
sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) && !IsServer(client_p) ? L_NETWIDE : L_ALL,
sendto_realops_snomask(SNO_GENERAL, !IsServer(client_p) ? L_NETWIDE : L_ALL,
"Server %s closed the connection",
client_p->name);

Expand All @@ -2144,7 +2144,7 @@ error_exit_client(struct Client *client_p, int error)
}
else
{
sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) && !IsServer(client_p) ? L_NETWIDE : L_ALL,
sendto_realops_snomask(SNO_GENERAL, !IsServer(client_p) ? L_NETWIDE : L_ALL,
"Lost connection to %s: %s",
client_p->name, strerror(current_error));
ilog(L_SERVER, "Lost connection to %s: %s",
Expand Down
2 changes: 1 addition & 1 deletion ircd/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew)
char *t;
if(IsServer(client_p))
{
sendto_realops_snomask(SNO_DEBUG, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"*** Long channel name from %s (%d > %d): %s",
client_p->name, len, CHANNELLEN, s);
}
Expand Down
2 changes: 1 addition & 1 deletion ircd/ircd.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ check_rehash(void *unused)

if(doremotd)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Got signal SIGUSR1, reloading ircd motd file");
cache_user_motd();
doremotd = false;
Expand Down
8 changes: 4 additions & 4 deletions ircd/listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ inetport(struct Listener *listener)
}

if (F == NULL) {
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Cannot open socket for listener on %s port %d",
listener->sctp ? "SCTP" : "TCP",
get_listener_port(listener));
Expand All @@ -203,7 +203,7 @@ inetport(struct Listener *listener)

if (ret) {
errstr = strerror(rb_get_sockerr(F));
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Cannot bind for listener on %s port %d: %s",
listener->sctp ? "SCTP" : "TCP",
get_listener_port(listener), errstr);
Expand All @@ -217,7 +217,7 @@ inetport(struct Listener *listener)
if(rb_listen(F, SOMAXCONN, listener->defer_accept))
{
errstr = strerror(rb_get_sockerr(F));
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Cannot listen() for listener on %s port %d: %s",
listener->sctp ? "SCTP" : "TCP",
get_listener_port(listener), errstr);
Expand Down Expand Up @@ -600,7 +600,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
*/
if((last_oper_notice + 20) <= rb_current_time())
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"All connections in use. (%s)",
get_listener_name(listener));
last_oper_notice = rb_current_time();
Expand Down
Loading