X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_whowas.c;h=eee2745cd1603ad365923d5c1e32ae3cfbb33c5e;hb=refs%2Fheads%2Fupstream;hp=adcaaeac2352a868e26ccfd072b964eea5381dff;hpb=cc05a230ac079fa15a2e43e6e68ef7126128cefd;p=ircu2.10.12-pk.git diff --git a/ircd/m_whowas.c b/ircd/m_whowas.c index adcaaea..eee2745 100644 --- a/ircd/m_whowas.c +++ b/ircd/m_whowas.c @@ -84,7 +84,8 @@ #include "client.h" #include "hash.h" #include "ircd.h" -#include "ircd_policy.h" +#include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -95,7 +96,7 @@ #include "send.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* @@ -103,7 +104,7 @@ * * parv[0] = sender prefix * parv[1] = nickname queried - * parv[2] = maximum returned items (optional, default is unlimitted) + * parv[2] = maximum returned items (optional, default is unlimited) * parv[3] = remote server target (Opers only, max returned items 20) */ int m_whowas(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) @@ -136,16 +137,14 @@ int m_whowas(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (0 == ircd_strcmp(nick, temp->name)) { send_reply(sptr, RPL_WHOWASUSER, temp->name, temp->username, - (IsAnOper(sptr) && temp->realhost) ? temp->realhost : temp->hostname, temp->realname); -#ifdef HEAD_IN_SAND_WHOIS_SERVERNAME - if (!IsOper(sptr)) - send_reply(sptr, RPL_WHOISSERVER, temp->name, - HEAD_IN_SAND_SERVERNAME, myctime(temp->logoff)); - else -#endif - send_reply(sptr, RPL_WHOISSERVER, temp->name, temp->servername, - myctime(temp->logoff)); + if (IsAnOper(sptr) && temp->realhost) + send_reply(sptr, RPL_WHOISACTUALLY, temp->name, temp->username, temp->realhost, ""); + send_reply(sptr, RPL_WHOISSERVER, temp->name, + (feature_bool(FEAT_HIS_WHOIS_SERVERNAME) && !IsOper(sptr)) ? + feature_str(FEAT_HIS_SERVERNAME) : + temp->servername, + myctime(temp->logoff)); if (temp->away) send_reply(sptr, RPL_AWAY, temp->name, temp->away); cur++;