X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/fa2a410abe67fe0a1327eec149451b971ab53360..8a64e49e4cfb8cbaf66f023626f31f7c10a47e29:/modules/m_whois.c diff --git a/modules/m_whois.c b/modules/m_whois.c index 04423f7..f4fb885 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -228,7 +228,6 @@ do_whois(struct Client *client_p, struct Client *source_p, int parc, const char static void single_whois(struct Client *source_p, struct Client *target_p, int operspy) { - const char *awaymsg; char buf[BUFSIZE]; rb_dlink_node *ptr; struct membership *msptr; @@ -305,9 +304,9 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) target_p->name, target_p->servptr->name, target_p->servptr->info); - if(!IsCapable(source_p, CLICAP_PRESENCE) && (awaymsg = get_metadata(target_p, "away")) != NULL) + if(target_p->user->away) sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY), - target_p->name, awaymsg); + target_p->name, target_p->user->away); if(IsOper(target_p)) { @@ -321,6 +320,11 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) if(IsSSLClient(target_p)) sendto_one_numeric(source_p, RPL_WHOISSECURE, form_str(RPL_WHOISSECURE), target_p->name); + if((source_p == target_p || IsOper(source_p)) && + target_p->certfp != NULL) + sendto_one_numeric(source_p, RPL_WHOISCERTFP, + form_str(RPL_WHOISCERTFP), + target_p->name, target_p->certfp); if(MyClient(target_p)) {