X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/5b0a527927c6c5f4decdc33cc06c24f4bc17f61f..fa2a410abe67fe0a1327eec149451b971ab53360:/modules/m_whois.c diff --git a/modules/m_whois.c b/modules/m_whois.c index 085e4d6..04423f7 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -69,7 +69,6 @@ DECLARE_MODULE_AV1(whois, NULL, NULL, whois_clist, whois_hlist, NULL, "$Revision /* * m_whois - * parv[0] = sender prefix * parv[1] = nickname masklist */ static int @@ -115,7 +114,6 @@ m_whois(struct Client *client_p, struct Client *source_p, int parc, const char * /* * ms_whois - * parv[0] = sender prefix * parv[1] = server to reply * parv[2] = nickname to whois */ @@ -230,6 +228,7 @@ 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; @@ -306,9 +305,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(target_p->user->away) + if(!IsCapable(source_p, CLICAP_PRESENCE) && (awaymsg = get_metadata(target_p, "away")) != NULL) sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY), - target_p->name, target_p->user->away); + target_p->name, awaymsg); if(IsOper(target_p)) {