From d032e7d7fd84074294835a1e2c9890763632d8c5 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Sat, 12 Dec 2020 07:16:25 +0000 Subject: [PATCH 1/2] Make more snotes NETWIDE --- include/s_assert.h | 4 ++-- ircd/authproc.c | 12 ++++++------ ircd/channel.c | 2 +- ircd/client.c | 30 +++++++++++++++--------------- ircd/logger.c | 8 ++++---- ircd/parse.c | 4 ++-- ircd/s_serv.c | 2 +- ircd/s_user.c | 8 ++++---- modules/core/m_message.c | 2 +- modules/core/m_nick.c | 8 ++++---- modules/core/m_squit.c | 2 +- modules/m_chghost.c | 2 +- modules/m_oper.c | 4 ++-- modules/m_pong.c | 2 +- modules/m_rehash.c | 28 ++++++++++++++-------------- modules/m_services.c | 10 +++++----- modules/m_signon.c | 4 ++-- 17 files changed, 66 insertions(+), 66 deletions(-) diff --git a/include/s_assert.h b/include/s_assert.h index 913ec1a9c..09e77e1be 100644 --- a/include/s_assert.h +++ b/include/s_assert.h @@ -38,7 +38,7 @@ ilog(L_MAIN, \ "file: %s line: %d (%s): Assertion failed: (%s)", \ __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr), 0) || (\ - sendto_realops_snomask(SNO_GENERAL, L_ALL, \ + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, \ "file: %s line: %d (%s): Assertion failed: (%s)", \ __FILE__, __LINE__, __PRETTY_FUNCTION__, #expr), 0) \ ) @@ -48,7 +48,7 @@ ilog(L_MAIN, \ "file: %s line: %d: Assertion failed: (%s)", \ __FILE__, __LINE__, #expr), 0) || ( \ - sendto_realops_snomask(SNO_GENERAL, L_ALL, \ + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, \ "file: %s line: %d: Assertion failed: (%s)" \ __FILE__, __LINE__, #expr), 0) \ ) diff --git a/ircd/authproc.c b/ircd/authproc.c index 4d2b98e31..1a6ea9659 100644 --- a/ircd/authproc.c +++ b/ircd/authproc.c @@ -229,23 +229,23 @@ cmd_oper_warn(int parc, char **parv) switch(*parv[1]) { case 'D': /* Debug */ - sendto_realops_snomask(SNO_DEBUG, L_ALL, "authd debug: %s", parv[2]); + sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "authd debug: %s", parv[2]); idebug("authd: %s", parv[2]); break; case 'I': /* Info */ - sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd info: %s", parv[2]); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd info: %s", parv[2]); inotice("authd: %s", parv[2]); break; case 'W': /* Warning */ - sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd WARNING: %s", parv[2]); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd WARNING: %s", parv[2]); iwarn("authd: %s", parv[2]); break; case 'C': /* Critical (error) */ - sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd CRITICAL: %s", parv[2]); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd CRITICAL: %s", parv[2]); ierror("authd: %s", parv[2]); break; default: /* idk */ - sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd sent us an unknown oper notice type (%s): %s", parv[1], parv[2]); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd sent us an unknown oper notice type (%s): %s", parv[1], parv[2]); ilog(L_MAIN, "authd unknown oper notice type (%s): %s", parv[1], parv[2]); break; } @@ -389,7 +389,7 @@ static void restart_authd_cb(rb_helper * helper) { iwarn("authd: restart_authd_cb called, authd died?"); - sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd: restart_authd_cb called, authd died?"); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd: restart_authd_cb called, authd died?"); if(helper != NULL) { diff --git a/ircd/channel.c b/ircd/channel.c index 17b840cc8..abb91d0a4 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -1336,7 +1336,7 @@ resv_chan_forcepart(const char *name, const char *reason, int temp_time) remove_user_from_channel(msptr); /* notify opers & user they were removed from the channel */ - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Forced PART for %s!%s@%s from %s (%s)", target_p->name, target_p->username, target_p->host, name, reason); diff --git a/ircd/client.c b/ircd/client.c index dd01d7442..10f169605 100644 --- a/ircd/client.c +++ b/ircd/client.c @@ -555,7 +555,7 @@ check_klines(void) continue; } - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "KLINE active for %s", get_client_name(client_p, HIDE_IP)); @@ -638,7 +638,7 @@ check_one_kline(struct ConfItem *kline) continue; } - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "KLINE active for %s", get_client_name(client_p, HIDE_IP)); @@ -673,7 +673,7 @@ check_dlines(void) if(aconf->status & CONF_EXEMPTDLINE) continue; - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "DLINE active for %s", get_client_name(client_p, HIDE_IP)); @@ -729,7 +729,7 @@ check_xlines(void) continue; } - sendto_realops_snomask(SNO_GENERAL, L_ALL, "XLINE active for %s", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "XLINE active for %s", get_client_name(client_p, HIDE_IP)); (void) exit_client(client_p, client_p, &me, "Bad user info"); @@ -838,7 +838,7 @@ update_client_exit_stats(struct Client *client_p) { if(IsServer(client_p)) { - sendto_realops_snomask(SNO_EXTERNAL, L_ALL, + sendto_realops_snomask(SNO_EXTERNAL, L_NETWIDE, "Server %s split from %s", client_p->name, client_p->servptr->name); if(HasSentEob(client_p)) @@ -1142,11 +1142,11 @@ free_exited_clients(void *unused) if(abt->client == target_p) { s_assert(0); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "On abort_list: %s stat: %u flags: %llu handler: %c", target_p->name, (unsigned int) target_p->status, (unsigned long long)target_p->flags, target_p->handler); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Please report this to the solanum developers!"); found++; } @@ -1162,7 +1162,7 @@ free_exited_clients(void *unused) if(ptr->data == NULL) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Warning: null client on dead_list!"); rb_dlinkDestroy(ptr, &dead_list); continue; @@ -1179,7 +1179,7 @@ free_exited_clients(void *unused) if(ptr->data == NULL) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Warning: null client on dead_list!"); rb_dlinkDestroy(ptr, &dead_list); continue; @@ -1286,11 +1286,11 @@ exit_aborted_clients(void *unused) if(rb_dlinkFind(abt->client, &dead_list)) { s_assert(0); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "On dead_list: %s stat: %u flags: %llu handler: %c", abt->client->name, (unsigned int) abt->client->status, (unsigned long long)abt->client->flags, abt->client->handler); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Please report this to the solanum developers!"); continue; } @@ -1576,7 +1576,7 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien if(source_p->serv != NULL) remove_dependents(client_p, source_p, from, IsPerson(from) ? newcomment : comment, comment1); - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s was connected" + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s was connected" " for %ld seconds. %d/%d sendK/recvK.", source_p->name, (long) rb_current_time() - source_p->localClient->firsttime, sendk, recvk); @@ -1617,13 +1617,13 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien if(IsOper(source_p)) rb_dlinkFindDestroy(source_p, &local_oper_list); - sendto_realops_snomask(SNO_CCONN, L_ALL, + sendto_realops_snomask(SNO_CCONN, L_NETWIDE, "Client exiting: %s (%s@%s) [%s] [%s]", source_p->name, source_p->username, source_p->host, comment, show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255"); - sendto_realops_snomask(SNO_CCONNEXT, L_ALL, + sendto_realops_snomask(SNO_CCONNEXT, L_NETWIDE, "CLIEXIT %s %s %s %s 0 %s", source_p->name, source_p->username, source_p->host, show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255", @@ -1939,7 +1939,7 @@ free_user(struct User *user, struct Client *client_p) */ if(user->refcnt < 0 || user->invited.head || user->channel.head) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "* %p user (%s!%s@%s) %p %p %p %lu %d *", client_p, client_p ? client_p-> diff --git a/ircd/logger.c b/ircd/logger.c index b2e8cad37..88764d31f 100644 --- a/ircd/logger.c +++ b/ircd/logger.c @@ -85,7 +85,7 @@ verify_logfile_access(const char *filename) snprintf(buf, sizeof(buf), "WARNING: Unable to access logfile %s - parent directory %s does not exist", filename, dirname); if(testing_conf || server_state_foreground) fprintf(stderr, "%s\n", buf); - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", buf); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s", buf); return; } @@ -97,7 +97,7 @@ verify_logfile_access(const char *filename) filename, dirname, strerror(errno)); if(testing_conf || server_state_foreground) fprintf(stderr, "%s\n", buf); - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", buf); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s", buf); } return; } @@ -107,7 +107,7 @@ verify_logfile_access(const char *filename) snprintf(buf, sizeof(buf), "WARNING: Access denied for logfile %s: %s", filename, strerror(errno)); if(testing_conf || server_state_foreground) fprintf(stderr, "%s\n", buf); - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", buf); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s", buf); return; } return; @@ -306,6 +306,6 @@ ilog_error(const char *error) errstr = strerror(e); ilog(L_IOERROR, "%s: %d (%s)", error, e, errstr); - sendto_realops_snomask(SNO_DEBUG, L_ALL, "%s: %d (%s)", + sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "%s: %d (%s)", error, e, errstr); } diff --git a/ircd/parse.c b/ircd/parse.c index 115ef8267..f7d6f305d 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -342,14 +342,14 @@ cancel_clients(struct Client *client_p, struct Client *source_p) */ if(IsServer(source_p) || IsMe(source_p)) { - sendto_realops_snomask(SNO_DEBUG, L_ALL, + sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Message for %s[%s] from %s", source_p->name, source_p->from->name, client_p->name); } else { - sendto_realops_snomask(SNO_DEBUG, L_ALL, + sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Message for %s[%s@%s!%s] from %s (TS, ignored)", source_p->name, source_p->username, diff --git a/ircd/s_serv.c b/ircd/s_serv.c index 210ed8b1b..8a591a056 100644 --- a/ircd/s_serv.c +++ b/ircd/s_serv.c @@ -848,7 +848,7 @@ server_estab(struct Client *client_p) rb_dlink_list_length(&serv_list); /* Show the real host/IP to admins */ - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Link with %s established: (%s) link", client_p->name, show_capabilities(client_p)); diff --git a/ircd/s_user.c b/ircd/s_user.c index 0fa78ba47..246244b07 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -608,13 +608,13 @@ register_local_user(struct Client *client_p, struct Client *source_p) */ rb_inet_ntop_sock((struct sockaddr *)&source_p->localClient->ip, ipaddr, sizeof(ipaddr)); - sendto_realops_snomask(SNO_CCONN, L_ALL, + sendto_realops_snomask(SNO_CCONN, L_NETWIDE, "Client connecting: %s (%s@%s) [%s] {%s} [%s]", source_p->name, source_p->username, source_p->orighost, show_ip(NULL, source_p) ? ipaddr : "255.255.255.255", get_client_class(source_p), source_p->info); - sendto_realops_snomask(SNO_CCONNEXT, L_ALL, + sendto_realops_snomask(SNO_CCONNEXT, L_NETWIDE, "CLICONN %s %s %s %s %s %s 0 %s", source_p->name, source_p->username, source_p->orighost, show_ip(NULL, source_p) ? ipaddr : "255.255.255.255", @@ -1457,7 +1457,7 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) source_p->handler = IsOperGeneral(source_p) ? OPER_HANDLER : CLIENT_HANDLER; - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s (%s!%s@%s) is now an operator", oper_p->name, source_p->name, source_p->username, source_p->host); sendto_server(NULL, NULL, CAP_TS6, NOCAPS, ":%s OPER %s %s", @@ -1620,7 +1620,7 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use target_p->name, user, host, nick); if(MyConnect(target_p)) - sendto_realops_snomask(SNO_NCHANGE, L_ALL, + sendto_realops_snomask(SNO_NCHANGE, L_NETWIDE, "Nick change: From %s to %s [%s@%s]", target_p->name, nick, target_p->username, target_p->host); diff --git a/modules/core/m_message.c b/modules/core/m_message.c index b90d2c867..c6c66c852 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -965,7 +965,7 @@ handle_special(enum message_type msgtype, struct Client *client_p, /* Check if someones msg'ing opers@our.server */ if(strncmp(nick, "opers@", 6) == 0) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, "To opers: From: %s: %s", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "To opers: From: %s: %s", source_p->name, text); return; } diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c index a5b94d591..d7597f366 100644 --- a/modules/core/m_nick.c +++ b/modules/core/m_nick.c @@ -502,17 +502,17 @@ ms_save(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ if (target_p == NULL) return; if (!IsPerson(target_p)) - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Ignored SAVE message for non-person %s from %s", target_p->name, source_p->name); else if (IsDigit(target_p->name[0])) - sendto_realops_snomask(SNO_DEBUG, L_ALL, + sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Ignored noop SAVE message for %s from %s", target_p->name, source_p->name); else if (target_p->tsinfo == atol(parv[2])) save_user(client_p, source_p, target_p); else - sendto_realops_snomask(SNO_SKILL, L_ALL, + sendto_realops_snomask(SNO_SKILL, L_NETWIDE, "Ignored SAVE message for %s from %s", target_p->name, source_p->name); } @@ -673,7 +673,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p, hook_info.arg2 = nick; call_hook(h_local_nick_change, &hook_info); - sendto_realops_snomask(SNO_NCHANGE, L_ALL, + sendto_realops_snomask(SNO_NCHANGE, L_NETWIDE, "Nick change: From %s to %s [%s@%s]", source_p->name, nick, source_p->username, source_p->host); diff --git a/modules/core/m_squit.c b/modules/core/m_squit.c index 9bd789bd6..ddea392cf 100644 --- a/modules/core/m_squit.c +++ b/modules/core/m_squit.c @@ -127,7 +127,7 @@ ms_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source /* Server is closing its link */ if (target_p == client_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, "Server %s closing link (%s)", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server %s closing link (%s)", target_p->name, comment); } /* diff --git a/modules/m_chghost.c b/modules/m_chghost.c index a402367a3..fa9628c82 100644 --- a/modules/m_chghost.c +++ b/modules/m_chghost.c @@ -139,7 +139,7 @@ do_chghost(struct Client *source_p, struct Client *target_p, if (MyClient(source_p)) sendto_one_notice(source_p, ":Changed hostname for %s to %s", target_p->name, target_p->host); if (!IsServer(source_p) && !IsService(source_p)) - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s changed hostname for %s to %s", get_oper_name(source_p), target_p->name, target_p->host); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s changed hostname for %s to %s", get_oper_name(source_p), target_p->name, target_p->host); return true; } diff --git a/modules/m_oper.c b/modules/m_oper.c index 6c42561c5..c42d592c7 100644 --- a/modules/m_oper.c +++ b/modules/m_oper.c @@ -122,7 +122,7 @@ m_oper(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p if(ConfigFileEntry.failed_oper_notice) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Failed OPER attempt - missing SSL/TLS by %s (%s@%s)", source_p->name, source_p->username, source_p->host); } @@ -140,7 +140,7 @@ m_oper(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p if(ConfigFileEntry.failed_oper_notice) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Failed OPER attempt - client certificate fingerprint mismatch by %s (%s@%s)", source_p->name, source_p->username, source_p->host); } diff --git a/modules/m_pong.c b/modules/m_pong.c index 5d1721584..a56ab7e52 100644 --- a/modules/m_pong.c +++ b/modules/m_pong.c @@ -87,7 +87,7 @@ ms_pong(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ if(IsServer(source_p) && !HasSentEob(source_p)) { if(MyConnect(source_p)) - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "End of burst (emulated) from %s (%d seconds)", source_p->name, (signed int) (rb_current_time() - source_p->localClient->firsttime)); diff --git a/modules/m_rehash.c b/modules/m_rehash.c index cb19d6d70..6543bb00b 100644 --- a/modules/m_rehash.c +++ b/modules/m_rehash.c @@ -67,7 +67,7 @@ struct hash_commands static void rehash_bans_loc(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is rehashing bans", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is rehashing bans", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -78,7 +78,7 @@ rehash_bans_loc(struct Client *source_p) static void rehash_dns(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is rehashing DNS", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is rehashing DNS", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -96,7 +96,7 @@ rehash_ssld(struct Client *source_p) return; } - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is restarting ssld", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is restarting ssld", get_oper_name(source_p)); restart_ssld(); @@ -105,7 +105,7 @@ rehash_ssld(struct Client *source_p) static void rehash_motd(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is forcing re-reading of MOTD file", get_oper_name(source_p)); if (!MyConnect(source_p)) @@ -117,7 +117,7 @@ rehash_motd(struct Client *source_p) static void rehash_omotd(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is forcing re-reading of OPER MOTD file", get_oper_name(source_p)); if (!MyConnect(source_p)) @@ -134,7 +134,7 @@ rehash_tklines(struct Client *source_p) rb_dlink_node *ptr, *next_ptr; int i; - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp klines", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing temp klines", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -158,7 +158,7 @@ rehash_tdlines(struct Client *source_p) rb_dlink_node *ptr, *next_ptr; int i; - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp dlines", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing temp dlines", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -182,7 +182,7 @@ rehash_txlines(struct Client *source_p) rb_dlink_node *ptr; rb_dlink_node *next_ptr; - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp xlines", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing temp xlines", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -207,7 +207,7 @@ rehash_tresvs(struct Client *source_p) rb_dlink_node *ptr; rb_dlink_node *next_ptr; - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp resvs", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing temp resvs", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -236,7 +236,7 @@ rehash_tresvs(struct Client *source_p) static void rehash_rejectcache(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing reject cache", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing reject cache", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -247,7 +247,7 @@ rehash_rejectcache(struct Client *source_p) static void rehash_throttles(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing throttles", + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing throttles", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; @@ -258,7 +258,7 @@ rehash_throttles(struct Client *source_p) static void rehash_help(struct Client *source_p) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is forcing re-reading of HELP files", get_oper_name(source_p)); if (!MyConnect(source_p)) @@ -273,7 +273,7 @@ rehash_nickdelay(struct Client *source_p) rb_dlink_node *ptr; rb_dlink_node *safe_ptr; - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is clearing the nick delay table", get_oper_name(source_p)); if (!MyConnect(source_p)) @@ -344,7 +344,7 @@ do_rehash(struct Client *source_p, const char *type) { sendto_one(source_p, form_str(RPL_REHASHING), me.name, source_p->name, ConfigFileEntry.configfile); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is rehashing server config file", get_oper_name(source_p)); if (!MyConnect(source_p)) remote_rehash_oper_p = source_p; diff --git a/modules/m_services.c b/modules/m_services.c index af7290646..011b4df55 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -120,7 +120,7 @@ me_su(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, if(!(source_p->flags & FLAGS_SERVICE)) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Non-service server %s attempting to execute services-only command SU", source_p->name); return; } @@ -164,7 +164,7 @@ me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source if(!(source_p->flags & FLAGS_SERVICE)) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Non-service server %s attempting to execute services-only command RSFNC", source_p->name); return; } @@ -208,7 +208,7 @@ me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source { kill_client_serv_butone(NULL, exist_p, "%s (Nickname regained by services)", me.name); - sendto_realops_snomask(SNO_SKILL, L_ALL, + sendto_realops_snomask(SNO_SKILL, L_NETWIDE, "Nick collision due to services forced nick change on %s", parv[2]); } @@ -231,7 +231,7 @@ me_rsfnc(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source invalidate_bancache_user(target_p); - sendto_realops_snomask(SNO_NCHANGE, L_ALL, + sendto_realops_snomask(SNO_NCHANGE, L_NETWIDE, "Nick change: From %s to %s [%s@%s]", target_p->name, parv[2], target_p->username, target_p->host); @@ -269,7 +269,7 @@ me_nickdelay(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so if(!(source_p->flags & FLAGS_SERVICE)) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Non-service server %s attempting to execute services-only command NICKDELAY", source_p->name); return; } diff --git a/modules/m_signon.c b/modules/m_signon.c index 3ad918347..458d8c12a 100644 --- a/modules/m_signon.c +++ b/modules/m_signon.c @@ -123,7 +123,7 @@ me_svslogin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou if(!(source_p->flags & FLAGS_SERVICE)) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Non-service server %s attempting to execute services-only command SVSLOGIN", source_p->name); return; } @@ -187,7 +187,7 @@ me_svslogin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou exist_p->flags |= FLAGS_KILLED; kill_client_serv_butone(NULL, exist_p, "%s (Nickname regained by services)", me.name); - sendto_realops_snomask(SNO_SKILL, L_ALL, + sendto_realops_snomask(SNO_SKILL, L_NETWIDE, "Nick collision due to SVSLOGIN on %s", nick); From cb0c957ac602d8bc6c1b6944058523a0e8742cec Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Sun, 20 Dec 2020 00:25:27 +0000 Subject: [PATCH 2/2] Drop redundant snote extensions --- extensions/Makefile.am | 4 -- extensions/sno_farconnect.c | 82 ------------------------------- extensions/sno_globalkline.c | 64 ------------------------ extensions/sno_globalnickchange.c | 46 ----------------- extensions/sno_globaloper.c | 39 --------------- 5 files changed, 235 deletions(-) delete mode 100644 extensions/sno_farconnect.c delete mode 100644 extensions/sno_globalkline.c delete mode 100644 extensions/sno_globalnickchange.c delete mode 100644 extensions/sno_globaloper.c diff --git a/extensions/Makefile.am b/extensions/Makefile.am index 9b7722075..abfcbe20c 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -41,10 +41,6 @@ extension_LTLIBRARIES = \ override_kick_immunity.la \ restrict-unauthenticated.la \ sno_channelcreate.la \ - sno_farconnect.la \ - sno_globalkline.la \ - sno_globalnickchange.la \ - sno_globaloper.la \ umode_noctcp.la \ m_adminwall.la \ m_echotags.la \ diff --git a/extensions/sno_farconnect.c b/extensions/sno_farconnect.c deleted file mode 100644 index 787806588..000000000 --- a/extensions/sno_farconnect.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Remote client connect/exit notices on snomask +F (far). - * To avoid flooding, connects/exits part of netjoins/netsplits are not shown. - * Consequently, it is not possible to use these notices to keep track - * of all clients. - * -- jilles - */ - -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" - -static const char sno_desc[] = - "Adds server notice mask +F that allows operators to receive notices for connections on other servers"; - -static int _modinit(void); -static void _moddeinit(void); -static void h_gcn_new_remote_user(struct Client *); -static void h_gcn_client_exit(hook_data_client_exit *); - -mapi_hfn_list_av1 gcn_hfnlist[] = { - { "new_remote_user", (hookfn) h_gcn_new_remote_user }, - { "client_exit", (hookfn) h_gcn_client_exit }, - { NULL, NULL } -}; - -DECLARE_MODULE_AV2(globalconnexit, _modinit, _moddeinit, NULL, NULL, gcn_hfnlist, NULL, NULL, sno_desc); - -static int -_modinit(void) -{ - /* add the snomask to the available slot */ - snomask_modes['F'] = find_snomask_slot(); - - /* show the fact that we are showing user information in /version */ - opers_see_all_users = true; - - return 0; -} - -static void -_moddeinit(void) -{ - /* disable the snomask and remove it from the available list */ - snomask_modes['F'] = 0; -} - -static void -h_gcn_new_remote_user(struct Client *source_p) -{ - - if (!HasSentEob(source_p->servptr)) - return; - sendto_realops_snomask_from(snomask_modes['F'], L_ALL, source_p->servptr, - "Client connecting: %s (%s@%s) [%s] {%s} [%s]", - source_p->name, source_p->username, source_p->orighost, - show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255", - "?", source_p->info); -} - -static void -h_gcn_client_exit(hook_data_client_exit *hdata) -{ - struct Client *source_p; - - source_p = hdata->target; - - if (MyConnect(source_p) || !IsClient(source_p)) - return; - if (!HasSentEob(source_p->servptr)) - return; - sendto_realops_snomask_from(snomask_modes['F'], L_ALL, source_p->servptr, - "Client exiting: %s (%s@%s) [%s] [%s]", - source_p->name, - source_p->username, source_p->host, hdata->comment, - show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255"); -} diff --git a/extensions/sno_globalkline.c b/extensions/sno_globalkline.c deleted file mode 100644 index 0b3285b2a..000000000 --- a/extensions/sno_globalkline.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Shows notices if remote clients exit with "Bad user info" or - * ConfigFileEntry.kline_reason. - * Assumes client_exit is enabled so users can't fake these reasons, - * and kline_reason is enabled and the same everywhere. - * Yes, this is a hack, but it is simple and avoids sending - * more data across servers -- jilles - */ - -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" - -static const char sno_desc[] = - "Adds server notices for global XLINEs, KLINEs, and DLINEs"; - -static void h_gla_client_exit(hook_data_client_exit *); - -mapi_hfn_list_av1 gla_hfnlist[] = { - { "client_exit", (hookfn) h_gla_client_exit }, - { NULL, NULL } -}; - -DECLARE_MODULE_AV2(globallineactive, NULL, NULL, NULL, NULL, gla_hfnlist, NULL, NULL, sno_desc); - -static void -h_gla_client_exit(hook_data_client_exit *hdata) -{ - struct Client *source_p; - - source_p = hdata->target; - - if (MyConnect(source_p) || !IsClient(source_p)) - return; - if (!strcmp(hdata->comment, "Bad user info")) - { - sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr, - "XLINE active for %s[%s@%s]", - source_p->name, source_p->username, source_p->host); - } - else if (ConfigFileEntry.kline_reason != NULL && - !strcmp(hdata->comment, ConfigFileEntry.kline_reason)) - { - sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr, - "K/DLINE active for %s[%s@%s]", - source_p->name, source_p->username, source_p->host); - } - else if (!strncmp(hdata->comment, "Temporary K-line ", 17)) - { - sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr, - "K/DLINE active for %s[%s@%s]", - source_p->name, source_p->username, source_p->host); - } - else if (!strncmp(hdata->comment, "Temporary D-line ", 17)) - { - sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr, - "K/DLINE active for %s[%s@%s]", - source_p->name, source_p->username, source_p->host); - } -} diff --git a/extensions/sno_globalnickchange.c b/extensions/sno_globalnickchange.c deleted file mode 100644 index 0e338c5cc..000000000 --- a/extensions/sno_globalnickchange.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Remote client nick change notices. - */ - -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" - -static const char sno_desc[] = - "Adds server notices for remote nick changes"; - -static int _modinit(void); -static void h_gnc_nick_change(hook_data *data); - -mapi_hfn_list_av1 gcn_hfnlist[] = { - { "remote_nick_change", (hookfn) h_gnc_nick_change }, - { NULL, NULL } -}; - -DECLARE_MODULE_AV2(globalnickchange, _modinit, NULL, NULL, NULL, gcn_hfnlist, NULL, NULL, sno_desc); - -static int -_modinit(void) -{ - /* show the fact that we are showing user information in /version */ - opers_see_all_users = true; - - return 0; -} - -static void -h_gnc_nick_change(hook_data *data) -{ - struct Client *source_p = data->client; - const char *oldnick = data->arg1; - const char *newnick = data->arg2; - - sendto_realops_snomask_from(SNO_NCHANGE, L_ALL, source_p->servptr, - "Nick change: From %s to %s [%s@%s]", - oldnick, newnick, source_p->username, source_p->host); -} diff --git a/extensions/sno_globaloper.c b/extensions/sno_globaloper.c deleted file mode 100644 index ea5476c29..000000000 --- a/extensions/sno_globaloper.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Remote oper up notices. - */ - -#include "stdinc.h" -#include "modules.h" -#include "client.h" -#include "hook.h" -#include "ircd.h" -#include "send.h" -#include "s_conf.h" -#include "snomask.h" - -static const char sno_desc[] = - "Adds server notices for remote oper up"; - -static void h_sgo_umode_changed(void *); - -mapi_hfn_list_av1 sgo_hfnlist[] = { - { "umode_changed", (hookfn) h_sgo_umode_changed }, - { NULL, NULL } -}; - -DECLARE_MODULE_AV2(sno_globaloper, NULL, NULL, NULL, NULL, sgo_hfnlist, NULL, NULL, sno_desc); - -static void -h_sgo_umode_changed(void *vdata) -{ - hook_data_umode_changed *data = (hook_data_umode_changed *)vdata; - struct Client *source_p = data->client; - - if (MyConnect(source_p) || !HasSentEob(source_p->servptr)) - return; - - if (!(data->oldumodes & UMODE_OPER) && IsOper(source_p)) - sendto_realops_snomask_from(SNO_GENERAL, L_ALL, source_p->servptr, - "%s (%s@%s) is now an operator", - source_p->name, source_p->username, source_p->host); -}