#include "s_conf.h"
#include "s_serv.h"
#include "send.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
#include "s_conf.h"
#include "logger.h"
#include "msg.h"
/*
* m_whois
- * parv[0] = sender prefix
* parv[1] = nickname masklist
*/
static int
/*
* ms_whois
- * parv[0] = sender prefix
* parv[1] = server to reply
* parv[2] = nickname to whois
*/
{
char buffer[BUFSIZE];
- snprintf(buffer, sizeof(buffer), "%s!%s@%s %s",
+ rb_snprintf(buffer, sizeof(buffer), "%s!%s@%s %s",
target_p->name, target_p->username,
target_p->host, target_p->servptr->name);
report_operspy(source_p, "WHOIS", buffer);
static void
single_whois(struct Client *source_p, struct Client *target_p, int operspy)
{
+ const char *awaymsg;
char buf[BUFSIZE];
rb_dlink_node *ptr;
struct membership *msptr;
char *t;
int tlen;
hook_data_client hdata;
- char *name;
- char quest[] = "?";
int visible;
int extra_space = 0;
- if(target_p->name[0] == '\0')
- name = quest;
- else
- name = target_p->name;
-
if(target_p->user == NULL)
{
s_assert(0);
target_p->name, target_p->servptr->name,
target_p->servptr->info);
- if(target_p->user->away)
+ if(!IsCapable(source_p, CLICAP_PRESENCE) && (awaymsg = get_metadata(target_p, "away")) != NULL)
sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY),
- target_p->name, target_p->user->away);
+ target_p->name, awaymsg);
if(IsOper(target_p))
{
GlobalSetOptions.operstring));
}
+ if(IsSSLClient(target_p))
+ sendto_one_numeric(source_p, RPL_WHOISSECURE, form_str(RPL_WHOISSECURE),
+ target_p->name);
+
if(MyClient(target_p))
{
if (IsDynSpoof(target_p) && (IsOper(source_p) || source_p == target_p))