#include "hash.h"
#include "ircd.h"
#include "ircd_features.h"
+#include "ircd_log.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "match.h"
#include "send.h"
#include "whocmds.h"
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <string.h>
/*
* 2000-07-01: Isomer
* * Rewritten to make this understandable
- * * You can nolonger /whois unregistered clients.
+ * * You can no longer /whois unregistered clients.
*
*
* General rules:
const struct User* user = cli_user(acptr);
const char* name = (!*(cli_name(acptr))) ? "?" : cli_name(acptr);
- a2cptr = user->server;
+ a2cptr = feature_bool(FEAT_HIS_WHOIS_SERVERNAME) && !IsAnOper(sptr)
+ && sptr != acptr ? &his : user->server;
assert(user);
send_reply(sptr, RPL_WHOISUSER, name, user->username, user->host,
cli_info(acptr));
}
if (IsDeaf(acptr))
*(buf + len++) = '-';
- if (IsOper(sptr) && !ShowChannel(sptr, chptr))
+ if (!ShowChannel(sptr, chptr))
*(buf + len++) = '*';
if (IsDelayedJoin(chan) && (sptr != acptr))
*(buf + len++) = '<';
send_reply(sptr, RPL_WHOISCHANNELS, name, buf);
}
- if (feature_bool(FEAT_HIS_WHOIS_SERVERNAME) && !IsAnOper(sptr) &&
- sptr != acptr)
- send_reply(sptr, RPL_WHOISSERVER, name, feature_str(FEAT_HIS_SERVERNAME),
- feature_str(FEAT_HIS_SERVERINFO));
- else
- send_reply(sptr, RPL_WHOISSERVER, name, cli_name(a2cptr),
- cli_info(a2cptr));
+ send_reply(sptr, RPL_WHOISSERVER, name, cli_name(a2cptr),
+ cli_info(a2cptr));
if (user)
{
*/
static int do_wilds(struct Client* sptr, char *nick, int count, int parc)
{
- struct Client *acptr; /* Current client we're concidering */
+ struct Client *acptr; /* Current client we're considering */
struct User *user; /* the user portion of the client */
- const char *name; /* the name of this client */
struct Membership* chan;
int invis; /* does +i apply? */
int member; /* Is this user on any channels? */
int showperson; /* Should we show this person? */
int found = 0 ; /* How many were found? */
- /* Ech! This is hidious! */
+ /* Ech! This is hideous! */
for (acptr = GlobalClientList; (acptr = next_client(acptr, nick));
acptr = cli_next(acptr))
{
/*
* I'm always last :-) and acptr->next == 0!!
*
- * Isomer: Does this strike anyone else as being a horrible hidious
+ * Isomer: Does this strike anyone else as being a horrible hideous
* hack?
*/
if (IsMe(acptr)) {
/*
* 'Rules' established for sending a WHOIS reply:
*
- * - if wildcards are being used dont send a reply if
- * the querier isnt any common channels and the
+ * - if wildcards are being used don't send a reply if
+ * the querier isn't any common channels and the
* client in question is invisible.
*
* - only send replies about common or public channels
* the target user(s) are on;
*/
user = cli_user(acptr);
- name = (!*(cli_name(acptr))) ? "?" : cli_name(acptr);
assert(user);
invis = (acptr != sptr) && IsInvisible(acptr);