0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 21:28:53 +02:00

whois: list active operator block and privset when appropriate

This commit is contained in:
William Pitcock 2015-12-28 01:33:09 -06:00
parent c7b2fd3d66
commit 72ad5c04fe
3 changed files with 12 additions and 0 deletions

View file

@ -97,6 +97,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"

View file

@ -145,6 +145,7 @@
#define RPL_ENDOFWHOIS 318
#define RPL_WHOISCHANNELS 319
#define RPL_WHOISSPECIAL 320
#define RPL_LISTSTART 321
#define RPL_LIST 322

View file

@ -319,6 +319,16 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
GlobalSetOptions.operstring));
}
if(MyClient(target_p) && !EmptyString(target_p->localClient->opername) &&
(IsOperAdmin(source_p) || IsAdmin(source_p) || (source_p == target_p)))
{
char buf[512];
rb_snprintf(buf, sizeof(buf), "Opered as %s, privset %s",
target_p->localClient->opername, target_p->localClient->privset->name);
sendto_one_numeric(source_p, RPL_WHOISSPECIAL, form_str(RPL_WHOISSPECIAL),
target_p->name, buf);
}
if(IsSSLClient(target_p))
{
char cbuf[256] = "is using a secure connection";