#include "hash.h"
#include "ircd.h"
#include "ircd_chattr.h"
+#include "ircd_features.h"
#include "ircd_log.h"
-#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "match.h"
continue;
case 's':
case 'S':
-#ifdef HEAD_IN_SAND_WHO_SERVERNAME
- if (IsAnOper(sptr))
-#endif
- matchsel |= WHO_FIELD_SER;
+ matchsel |= WHO_FIELD_SER;
continue;
case 'r':
case 'R':
matchsel |= WHO_FIELD_REN;
continue;
+ case 'a':
+ case 'A':
+ matchsel |= WHO_FIELD_ACC;
+ continue;
}
if (ch == '%')
while ((ch = *p++) && (ch != ','))
break;
case 's':
case 'S':
-#ifdef HEAD_IN_SAND_WHO_SERVERNAME
- if (IsAnOper(sptr))
-#endif
- fields |= WHO_FIELD_SER;
+ fields |= WHO_FIELD_SER;
break;
case 't':
case 'T':
case 'U':
fields |= WHO_FIELD_UID;
break;
+ case 'a':
+ case 'A':
+ fields |= WHO_FIELD_ACC;
+ break;
default:
break;
}
if (!fields)
counter = 7;
+ if (feature_bool(FEAT_HIS_WHO_SERVERNAME) && !IsAnOper(sptr))
+ matchsel &= ~WHO_FIELD_SER;
+
if (qrt && (fields & WHO_FIELD_QTY))
{
p = qrt;
&& ((!(matchsel & WHO_FIELD_UID))
|| matchexec(cli_user(acptr)->username, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_SER))
- || (!(cli_flags(cli_user(acptr)->server) & FLAGS_MAP)))
+ || (!(HasFlag(cli_user(acptr)->server, FLAG_MAP))))
&& ((!(matchsel & WHO_FIELD_HOS))
|| matchexec(cli_user(acptr)->host, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_HOS))
&& ((!(matchsel & WHO_FIELD_REN))
|| matchexec(cli_info(acptr), mymask, minlen))
&& ((!(matchsel & WHO_FIELD_NIP))
+ || (HasHiddenHost(acptr) && !IsAnOper(sptr))
|| ((((cli_ip(acptr).s_addr & imask.mask.s_addr) !=
imask.bits.s_addr)) || (imask.fall
&& matchexec(ircd_ntoa((const char*) &(cli_ip(acptr))), mymask, minlen)))))
&& ((!(matchsel & WHO_FIELD_UID))
|| matchexec(cli_user(acptr)->username, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_SER))
- || (!(cli_flags(cli_user(acptr)->server) & FLAGS_MAP)))
+ || (!(HasFlag(cli_user(acptr)->server, FLAG_MAP))))
&& ((!(matchsel & WHO_FIELD_HOS))
|| matchexec(cli_user(acptr)->host, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_HOS))
&& ((!(matchsel & WHO_FIELD_REN))
|| matchexec(cli_info(acptr), mymask, minlen))
&& ((!(matchsel & WHO_FIELD_NIP))
+ || (HasHiddenHost(acptr) && !IsAnOper(sptr))
|| ((((cli_ip(acptr).s_addr & imask.mask.s_addr) != imask.bits.s_addr))
|| (imask.fall
&& matchexec(ircd_ntoa((const char*) &(cli_ip(acptr))), mymask, minlen)))))