]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_userhost.c
presence: Remove user.away, replaced by a metadata entry.
[irc/rqf/shadowircd.git] / modules / m_userhost.c
index 964aa6b9ea7f259a150603d7439d0beb65163b29..766334caf47e4405ceb923b21a81b357a96052a1 100644 (file)
@@ -30,7 +30,7 @@
 #include "numeric.h"
 #include "s_serv.h"
 #include "send.h"
-#include "irc_string.h"
+#include "match.h"
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
@@ -63,7 +63,7 @@ m_userhost(struct Client *client_p, struct Client *source_p, int parc, const cha
        int cur_len;
        int rl;
 
-       cur_len = rb_sprintf(buf, form_str(RPL_USERHOST), me.name, parv[0], "");
+       cur_len = rb_sprintf(buf, form_str(RPL_USERHOST), me.name, source_p->name, "");
        t = buf + cur_len;
 
        for (i = 1; i <= 5; i++)
@@ -84,7 +84,7 @@ m_userhost(struct Client *client_p, struct Client *source_p, int parc, const cha
                                rl = rb_sprintf(response, "%s%s=%c%s@%s ",
                                                target_p->name,
                                                IsOper(target_p) ? "*" : "",
-                                               (target_p->user->away) ? '-' : '+',
+                                               (get_metadata(target_p, "away") != NULL) ? '-' : '+',
                                                target_p->username,
                                                target_p->sockhost);
                        }
@@ -93,7 +93,7 @@ m_userhost(struct Client *client_p, struct Client *source_p, int parc, const cha
                                rl = rb_sprintf(response, "%s%s=%c%s@%s ",
                                                target_p->name,
                                                IsOper(target_p) ? "*" : "",
-                                               (target_p->user->away) ? '-' : '+',
+                                               (get_metadata(target_p, "away") != NULL) ? '-' : '+',
                                                target_p->username, target_p->host);
                        }