mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-13 13:41:37 +01:00
Get rid of BREPORT_xx mess.
This commit is contained in:
parent
87406d752b
commit
63298af6b2
4 changed files with 19 additions and 39 deletions
19
include/h.h
19
include/h.h
|
@ -143,18 +143,13 @@ extern void del_ListItem(ListStruct *, ListStruct **);
|
|||
extern MODVAR LoopStruct loop;
|
||||
extern int del_banid(Channel *channel, char *banid);
|
||||
extern int del_exbanid(Channel *channel, char *banid);
|
||||
#define BREPORT_DO_DNS "NOTICE * :*** Looking up your hostname...\r\n"
|
||||
#define BREPORT_FIN_DNS "NOTICE * :*** Found your hostname\r\n"
|
||||
#define BREPORT_FIN_DNSC "NOTICE * :*** Found your hostname (cached)\r\n"
|
||||
#define BREPORT_FAIL_DNS "NOTICE * :*** Couldn't resolve your hostname; using your IP address instead\r\n"
|
||||
#define BREPORT_DO_ID "NOTICE * :*** Checking ident...\r\n"
|
||||
#define BREPORT_FIN_ID "NOTICE * :*** Received identd response\r\n"
|
||||
#define BREPORT_FAIL_ID "NOTICE * :*** No ident response; username prefixed with ~\r\n"
|
||||
|
||||
extern MODVAR char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
|
||||
REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256],
|
||||
REPORT_FAIL_ID[256];
|
||||
|
||||
#define REPORT_DO_DNS "NOTICE * :*** Looking up your hostname...\r\n"
|
||||
#define REPORT_FIN_DNS "NOTICE * :*** Found your hostname\r\n"
|
||||
#define REPORT_FIN_DNSC "NOTICE * :*** Found your hostname (cached)\r\n"
|
||||
#define REPORT_FAIL_DNS "NOTICE * :*** Couldn't resolve your hostname; using your IP address instead\r\n"
|
||||
#define REPORT_DO_ID "NOTICE * :*** Checking ident...\r\n"
|
||||
#define REPORT_FIN_ID "NOTICE * :*** Received identd response\r\n"
|
||||
#define REPORT_FAIL_ID "NOTICE * :*** No ident response; username prefixed with ~\r\n"
|
||||
extern MODVAR int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns, R_do_id, R_fin_id, R_fail_id;
|
||||
extern MODVAR struct list_head client_list;
|
||||
extern MODVAR struct list_head lclient_list;
|
||||
|
|
10
src/bsd.c
10
src/bsd.c
|
@ -1020,7 +1020,7 @@ struct hostent *he;
|
|||
if (!DONT_RESOLVE)
|
||||
{
|
||||
if (should_show_connect_info(client))
|
||||
sendto_one(client, NULL, "%s", REPORT_DO_DNS);
|
||||
sendto_one(client, NULL, ":%s %s", me.name, REPORT_DO_DNS);
|
||||
dns_special_flag = 1;
|
||||
he = unrealdns_doclient(client);
|
||||
dns_special_flag = 0;
|
||||
|
@ -1036,7 +1036,7 @@ struct hostent *he;
|
|||
/* Host was in our cache */
|
||||
client->local->hostp = he;
|
||||
if (should_show_connect_info(client))
|
||||
sendto_one(client, NULL, "%s", REPORT_FIN_DNSC);
|
||||
sendto_one(client, NULL, ":%s %s", me.name, REPORT_FIN_DNSC);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1050,7 +1050,11 @@ void proceed_normal_client_handshake(Client *client, struct hostent *he)
|
|||
ClearDNSLookup(client);
|
||||
client->local->hostp = he;
|
||||
if (should_show_connect_info(client))
|
||||
sendto_one(client, NULL, "%s", client->local->hostp ? REPORT_FIN_DNS : REPORT_FAIL_DNS);
|
||||
{
|
||||
sendto_one(client, NULL, ":%s %s",
|
||||
me.name,
|
||||
client->local->hostp ? REPORT_FIN_DNS : REPORT_FAIL_DNS);
|
||||
}
|
||||
|
||||
if (!dns_special_flag && !IsIdentLookup(client))
|
||||
finish_auth(client);
|
||||
|
|
23
src/ircd.c
23
src/ircd.c
|
@ -39,13 +39,8 @@ uid_t irc_uid = 0;
|
|||
gid_t irc_gid = 0;
|
||||
#endif
|
||||
|
||||
int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns, R_do_id, R_fin_id, R_fail_id;
|
||||
|
||||
char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
|
||||
REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256],
|
||||
REPORT_FAIL_ID[256];
|
||||
IRCCounts irccounts;
|
||||
Client me; /* That's me */
|
||||
MODVAR IRCCounts irccounts;
|
||||
MODVAR Client me; /* That's me */
|
||||
MODVAR char *me_hash;
|
||||
extern char backupbuf[8192];
|
||||
#ifdef _WIN32
|
||||
|
@ -1348,20 +1343,6 @@ int InitUnrealIRCd(int argc, char *argv[])
|
|||
#ifdef _WIN32
|
||||
loop.ircd_forked = 1;
|
||||
#endif
|
||||
ircsnprintf(REPORT_DO_DNS, sizeof(REPORT_DO_DNS), ":%s %s", me.name, BREPORT_DO_DNS);
|
||||
ircsnprintf(REPORT_FIN_DNS, sizeof(REPORT_FIN_DNS), ":%s %s", me.name, BREPORT_FIN_DNS);
|
||||
ircsnprintf(REPORT_FIN_DNSC, sizeof(REPORT_FIN_DNSC), ":%s %s", me.name, BREPORT_FIN_DNSC);
|
||||
ircsnprintf(REPORT_FAIL_DNS, sizeof(REPORT_FAIL_DNS), ":%s %s", me.name, BREPORT_FAIL_DNS);
|
||||
ircsnprintf(REPORT_DO_ID, sizeof(REPORT_DO_ID), ":%s %s", me.name, BREPORT_DO_ID);
|
||||
ircsnprintf(REPORT_FIN_ID, sizeof(REPORT_FIN_ID), ":%s %s", me.name, BREPORT_FIN_ID);
|
||||
ircsnprintf(REPORT_FAIL_ID, sizeof(REPORT_FAIL_ID), ":%s %s", me.name, BREPORT_FAIL_ID);
|
||||
R_do_dns = strlen(REPORT_DO_DNS);
|
||||
R_fin_dns = strlen(REPORT_FIN_DNS);
|
||||
R_fin_dnsc = strlen(REPORT_FIN_DNSC);
|
||||
R_fail_dns = strlen(REPORT_FAIL_DNS);
|
||||
R_do_id = strlen(REPORT_DO_ID);
|
||||
R_fin_id = strlen(REPORT_FIN_ID);
|
||||
R_fail_id = strlen(REPORT_FAIL_ID);
|
||||
|
||||
fix_timers();
|
||||
write_pidfile();
|
||||
|
|
|
@ -54,7 +54,7 @@ static void ident_lookup_failed(Client *client)
|
|||
ClearIdentLookupSent(client);
|
||||
ClearIdentLookup(client);
|
||||
if (should_show_connect_info(client))
|
||||
sendto_one(client, NULL, "%s", REPORT_FAIL_ID);
|
||||
sendto_one(client, NULL, ":%s %s", me.name, REPORT_FAIL_ID);
|
||||
if (!IsDNSLookup(client))
|
||||
finish_auth(client);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ static int ident_lookup_connect(Client *client)
|
|||
}
|
||||
|
||||
if (should_show_connect_info(client))
|
||||
sendto_one(client, NULL, "%s", REPORT_DO_ID);
|
||||
sendto_one(client, NULL, ":%s %s", me.name, REPORT_DO_ID);
|
||||
|
||||
set_sock_opts(client->local->authfd, client, IsIPV6(client));
|
||||
|
||||
|
@ -166,7 +166,7 @@ static void ident_lookup_receive(int fd, int revents, void *userdata)
|
|||
finish_auth(client);
|
||||
|
||||
if (should_show_connect_info(client))
|
||||
sendto_one(client, NULL, "%s", REPORT_FIN_ID);
|
||||
sendto_one(client, NULL, ":%s %s", me.name, REPORT_FIN_ID);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue