diff --git a/TODO-SHADOW b/TODO-SHADOW index 790b21f..5d3a9f5 100644 --- a/TODO-SHADOW +++ b/TODO-SHADOW @@ -1,6 +1,5 @@ Todo list for ShadowIRCd 6.0 ----------------------------- -* swhois support * custom operstrings * norepeat cmode * kicknorejoin (+J in inspircd chmode) diff --git a/modules/m_whois.c b/modules/m_whois.c index 8ce505c..476a959 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -243,6 +243,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) int i; char *m; int showsecret = 0; + struct Metadata *md; if(ConfigFileEntry.secret_channels_in_whois && IsOperSpy(source_p)) showsecret = 1; @@ -322,6 +323,8 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) IsService(target_p) ? ConfigFileEntry.servicestring : (IsAdmin(target_p) ? GlobalSetOptions.adminstring : GlobalSetOptions.operstring)); + if(md = user_metadata_find(target_p, "SWHOIS")) + sendto_one_numeric(source_p, 320, "%s :%s", target_p->name, md->value); } if(IsSSLClient(target_p)) diff --git a/src/s_user.c b/src/s_user.c index 04b1838..b2c0c4e 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1337,6 +1337,9 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) else source_p->umodes |= DEFAULT_OPER_UMODES; + if(oper_p->swhois) + user_metadata_add(source_p, "SWHOIS", oper_p->swhois, 1); + if(oper_p->vhost || !EmptyString(ConfigFileEntry.default_operhost)) { if(oper_p->vhost)