]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_whois.c
challenge: Fix build.
[irc/rqf/shadowircd.git] / modules / m_whois.c
index 950dbfad64754bcbdb1505d1c4a1f9b09e2e00a1..f4fb8854d06f04ccf27e0c7aab04cf44fb421cf9 100644 (file)
@@ -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;
@@ -240,8 +239,6 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
        hook_data_client hdata;
        int visible;
        int extra_space = 0;
-       struct DictionaryIter iter;
-       struct MetadataEntry *md;
 
        if(target_p->user == NULL)
        {
@@ -307,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((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))
        {
@@ -323,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))
        {
@@ -369,17 +371,6 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
                }
        }
 
-       DICTIONARY_FOREACH(md, &iter, target_p->user->metadata)
-       {
-               /* XXX: hack around "away" for legacy clients. --nenolod */
-               if (!irccmp(md->key, "away"))
-                       continue;
-
-               sendto_one_numeric(source_p, RPL_WHOISMETADATA,
-                                  form_str(RPL_WHOISMETADATA),
-                                  target_p->name, md->key, md->value);
-       }
-
        hdata.client = source_p;
        hdata.target = target_p;