From 460e7932744e7d48795875270a1a610a6a8dfa31 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Tue, 3 Oct 2023 16:35:52 -0700 Subject: [PATCH] Replace RPL_WHOISTEXT(337) with RPL_WHOISSPECIAL(320) (#419) Reasons: * 337 conflicts with other IRCds use as RPL_ENDOFINVITELIST * 320 is commonly used for extra human-readable information --- include/messages.h | 2 +- include/numeric.h | 2 +- modules/m_whois.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/messages.h b/include/messages.h index 0130111e..a50d9a6d 100644 --- a/include/messages.h +++ b/include/messages.h @@ -96,6 +96,7 @@ #define NUMERIC_STR_317 "%s %ld %lu :seconds idle, signon time" #define NUMERIC_STR_318 "%s :End of /WHOIS list." #define NUMERIC_STR_319 ":%s 319 %s %s :" +#define NUMERIC_STR_320 "%s :%s" #define NUMERIC_STR_321 ":%s 321 %s Channel :Users Name" #define NUMERIC_STR_322 ":%s 322 %s %s%s %lu :%s" #define NUMERIC_STR_323 ":%s 323 %s :End of /LIST" @@ -106,7 +107,6 @@ #define NUMERIC_STR_331 ":%s 331 %s %s :No topic is set." #define NUMERIC_STR_332 ":%s 332 %s %s :%s" #define NUMERIC_STR_333 ":%s 333 %s %s %s %lld" -#define NUMERIC_STR_337 "%s :%s" #define NUMERIC_STR_338 "%s %s :actually using host" #define NUMERIC_STR_341 ":%s 341 %s %s %s" #define NUMERIC_STR_346 ":%s 346 %s %s %s %s %lu" diff --git a/include/numeric.h b/include/numeric.h index dcabff61..9132b7d1 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -144,6 +144,7 @@ #define RPL_ENDOFWHOIS 318 #define RPL_WHOISCHANNELS 319 +#define RPL_WHOISSPECIAL 320 #define RPL_LISTSTART 321 #define RPL_LIST 322 @@ -159,7 +160,6 @@ #define RPL_NOTOPIC 331 #define RPL_TOPIC 332 #define RPL_TOPICWHOTIME 333 -#define RPL_WHOISTEXT 337 #define RPL_WHOISACTUALLY 338 #define RPL_INVITING 341 diff --git a/modules/m_whois.c b/modules/m_whois.c index 117acadb..bb37a5ba 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -370,7 +370,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) { rb_inet_ntop_sock((struct sockaddr *)&ip4, buf, sizeof buf); - sendto_one_numeric(source_p, RPL_WHOISTEXT, + sendto_one_numeric(source_p, RPL_WHOISSPECIAL, "%s :Underlying IPv4 is %s", target_p->name, buf); } @@ -395,17 +395,17 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) { if (hdata_showidle.approved == WHOIS_IDLE_HIDE) /* if the target has hidden their idle time, notify the source */ - sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "is hiding their idle time"); + sendto_one_numeric(source_p, RPL_WHOISSPECIAL, form_str(RPL_WHOISSPECIAL), target_p->name, "is hiding their idle time"); else /* if the target has hidden their idle time, notify the source */ - sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "is hiding their idle time, but you have auspex"); + sendto_one_numeric(source_p, RPL_WHOISSPECIAL, form_str(RPL_WHOISSPECIAL), target_p->name, "is hiding their idle time, but you have auspex"); } else if (hdata_showidle.approved == WHOIS_IDLE_HIDE) /* if the source has hidden their idle time, notify the source that they can't view others' idle times either */ - sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "has a hidden idle time because your own idle time is hidden"); + sendto_one_numeric(source_p, RPL_WHOISSPECIAL, form_str(RPL_WHOISSPECIAL), target_p->name, "has a hidden idle time because your own idle time is hidden"); else /* client has auspex to be able to see idle time, but make sure they know that's why they're seeing it */ - sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, + sendto_one_numeric(source_p, RPL_WHOISSPECIAL, form_str(RPL_WHOISSPECIAL), target_p->name, "has a hidden idle time because your own idle time is hidden, but you have auspex"); } }