+ if (feature_bool(FEAT_HIS_WHO_HOPCOUNT) && !IsAnOper(sptr))
+ *p1++ = (sptr == acptr) ? '0' : '3';
+ else
+ /* three digit hopcount maximum */
+ p1 += ircd_snprintf(0, p1, 3, "%d", cli_hopcount(acptr));
+ }
+
+ if (fields & WHO_FIELD_IDL)
+ {
+ *p1++ = ' ';
+ if (MyUser(acptr) &&
+ (IsAnOper(sptr) || !feature_bool(FEAT_HIS_WHO_SERVERNAME) ||
+ acptr == sptr))
+ p1 += ircd_snprintf(0, p1, 11, "%d",
+ CurrentTime - cli_user(acptr)->last);
+ else
+ *p1++ = '0';
+ }
+
+ if (fields & WHO_FIELD_ACC)
+ {
+ char *p2 = cli_user(acptr)->account;
+ *(p1++) = ' ';
+ if (*p2)
+ while ((*p2) && (*(p1++) = *(p2++)));
+ else
+ *(p1++) = '0';
+ }
+
+ if (fields & WHO_FIELD_OPL)
+ {
+ if (!chan || !IsChanOp(chan))
+ {
+ strcpy(p1, " n/a");
+ p1 += 4;
+ }
+ else
+ {
+ int vis_level = MAXOPLEVEL;
+ if ((IsGlobalChannel(chan->channel->chname) ? IsOper(sptr) : IsAnOper(sptr))
+ || is_chan_op(sptr, chan->channel))
+ vis_level = OpLevel(chan);
+ p1 += ircd_snprintf(0, p1, 5, " %d", vis_level);
+ }