Finish adding swhois support.
This commit is contained in:
parent
90e68bbebf
commit
3e06a4c803
|
@ -1,6 +1,5 @@
|
||||||
Todo list for ShadowIRCd 6.0
|
Todo list for ShadowIRCd 6.0
|
||||||
-----------------------------
|
-----------------------------
|
||||||
* swhois support
|
|
||||||
* custom operstrings
|
* custom operstrings
|
||||||
* norepeat cmode
|
* norepeat cmode
|
||||||
* kicknorejoin (+J in inspircd chmode)
|
* kicknorejoin (+J in inspircd chmode)
|
||||||
|
|
|
@ -243,6 +243,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
||||||
int i;
|
int i;
|
||||||
char *m;
|
char *m;
|
||||||
int showsecret = 0;
|
int showsecret = 0;
|
||||||
|
struct Metadata *md;
|
||||||
|
|
||||||
if(ConfigFileEntry.secret_channels_in_whois && IsOperSpy(source_p))
|
if(ConfigFileEntry.secret_channels_in_whois && IsOperSpy(source_p))
|
||||||
showsecret = 1;
|
showsecret = 1;
|
||||||
|
@ -322,6 +323,8 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
||||||
IsService(target_p) ? ConfigFileEntry.servicestring :
|
IsService(target_p) ? ConfigFileEntry.servicestring :
|
||||||
(IsAdmin(target_p) ? GlobalSetOptions.adminstring :
|
(IsAdmin(target_p) ? GlobalSetOptions.adminstring :
|
||||||
GlobalSetOptions.operstring));
|
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))
|
if(IsSSLClient(target_p))
|
||||||
|
|
|
@ -1337,6 +1337,9 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
|
||||||
else
|
else
|
||||||
source_p->umodes |= DEFAULT_OPER_UMODES;
|
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 || !EmptyString(ConfigFileEntry.default_operhost))
|
||||||
{
|
{
|
||||||
if(oper_p->vhost)
|
if(oper_p->vhost)
|
||||||
|
|
Loading…
Reference in New Issue