Clarify ERR_NOOPERHOST and convert it to use sendto_one_numeric().

This commit is contained in:
William Pitcock 2010-02-17 06:51:41 -06:00
parent 3ad21d7513
commit 76169ea734
3 changed files with 7 additions and 8 deletions

View file

@ -172,8 +172,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
if(oper_p == NULL) if(oper_p == NULL)
{ {
sendto_one(source_p, form_str(ERR_NOOPERHOST), sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
me.name, source_p->name);
ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)",
source_p->localClient->opername, source_p->name, source_p->localClient->opername, source_p->name,
source_p->username, source_p->host, source_p->username, source_p->host,
@ -204,7 +203,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
if(oper_p == NULL) if(oper_p == NULL)
{ {
sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)",
parv[1], source_p->name, parv[1], source_p->name,
source_p->username, source_p->host, source_p->sockhost); source_p->username, source_p->host, source_p->sockhost);
@ -224,7 +223,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p)) if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p))
{ {
sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
ilog(L_FOPER, "FAILED CHALLENGE (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS", ilog(L_FOPER, "FAILED CHALLENGE (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS",
parv[1], source_p->name, source_p->username, source_p->host, parv[1], source_p->name, source_p->username, source_p->host,
source_p->sockhost); source_p->sockhost);

View file

@ -84,7 +84,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(oper_p == NULL) if(oper_p == NULL)
{ {
sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)", ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)",
name, source_p->name, name, source_p->name,
source_p->username, source_p->host, source_p->sockhost); source_p->username, source_p->host, source_p->sockhost);
@ -101,7 +101,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p)) if(IsOperConfNeedSSL(oper_p) && !IsSSLClient(source_p))
{ {
sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS", ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- requires SSL/TLS",
name, source_p->name, name, source_p->name,
source_p->username, source_p->host, source_p->sockhost); source_p->username, source_p->host, source_p->sockhost);
@ -119,7 +119,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p
{ {
if (source_p->certfp == NULL || strcasecmp(source_p->certfp, oper_p->certfp)) if (source_p->certfp == NULL || strcasecmp(source_p->certfp, oper_p->certfp))
{ {
sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- client certificate fingerprint mismatch", ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s) -- client certificate fingerprint mismatch",
name, source_p->name, name, source_p->name,
source_p->username, source_p->host, source_p->sockhost); source_p->username, source_p->host, source_p->sockhost);

View file

@ -512,7 +512,7 @@ static const char * replies[] = {
/* 488 */ NULL, /* 488 */ NULL,
/* 489 ERR_VOICENEEDED */ ":%s 489 %s %s :You're neither voiced nor channel operator", /* 489 ERR_VOICENEEDED */ ":%s 489 %s %s :You're neither voiced nor channel operator",
/* 490 */ NULL, /* 490 */ NULL,
/* 491 ERR_NOOPERHOST, */ ":%s 491 %s :Only few of mere mortals may try to enter the twilight zone", /* 491 ERR_NOOPERHOST, */ ":No appropriate o:lines were found for your host",
/* 492 */ NULL, /* 492 */ NULL,
/* 493 */ NULL, /* 493 */ NULL,
/* 494 */ NULL, /* 494 */ NULL,