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
This commit is contained in:
Eric Mertens 2023-10-03 16:35:52 -07:00 committed by GitHub
parent 2a0f0393d2
commit 460e793274
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -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"

View file

@ -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

View file

@ -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");
}
}