Finish adding swhois support.

This commit is contained in:
B.Greenham 2010-03-03 22:59:26 -05:00
parent 90e68bbebf
commit 3e06a4c803
3 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,5 @@
Todo list for ShadowIRCd 6.0
-----------------------------
* swhois support
* custom operstrings
* norepeat cmode
* kicknorejoin (+J in inspircd chmode)

View File

@ -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))

View File

@ -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)