X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/d99380b61b3fa166d2105bc017508392dbb38939..987ef7eb1f6c6e6bfb79fc0e7759702ff372ac7a:/modules/m_userhost.c diff --git a/modules/m_userhost.c b/modules/m_userhost.c index 964aa6b..766334c 100644 --- a/modules/m_userhost.c +++ b/modules/m_userhost.c @@ -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); }