Add .xxx TLD to country(), and some more const-correctness.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@122 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -118,7 +118,7 @@ ChannelList * BX_prepare_command (int *, char *, int);
|
|||||||
|
|
||||||
int timer_unban (void *, char *);
|
int timer_unban (void *, char *);
|
||||||
void check_server_connect (int);
|
void check_server_connect (int);
|
||||||
const char *country(char *);
|
const char *country(const char *);
|
||||||
int do_newuser (char *, char *, char *);
|
int do_newuser (char *, char *, char *);
|
||||||
int char_fucknut (register unsigned char *, char, int);
|
int char_fucknut (register unsigned char *, char, int);
|
||||||
BanList *ban_is_on_channel(register char *, register ChannelList *);
|
BanList *ban_is_on_channel(register char *, register ChannelList *);
|
||||||
|
|||||||
@@ -4902,7 +4902,7 @@ void check_server_connect(int server)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *country(char *hostname)
|
const char *country(const char *hostname)
|
||||||
{
|
{
|
||||||
#ifndef BITCHX_LITE
|
#ifndef BITCHX_LITE
|
||||||
static const struct {
|
static const struct {
|
||||||
@@ -5181,10 +5181,12 @@ static const struct {
|
|||||||
{"PRO", "Professional" },
|
{"PRO", "Professional" },
|
||||||
{"TEL", "Contact Information" },
|
{"TEL", "Contact Information" },
|
||||||
{"TRAVEL", "Travel Industry" },
|
{"TRAVEL", "Travel Industry" },
|
||||||
|
{"XXX", "Porn" },
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
char *p;
|
const char *p;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!hostname || !*hostname || isdigit((unsigned char)hostname[strlen(hostname)-1]))
|
if (!hostname || !*hostname || isdigit((unsigned char)hostname[strlen(hostname)-1]))
|
||||||
return "unknown";
|
return "unknown";
|
||||||
if ((p = strrchr(hostname, '.')))
|
if ((p = strrchr(hostname, '.')))
|
||||||
|
|||||||
Reference in New Issue
Block a user