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 *);
|
||||
void check_server_connect (int);
|
||||
const char *country(char *);
|
||||
const char *country(const char *);
|
||||
int do_newuser (char *, char *, char *);
|
||||
int char_fucknut (register unsigned char *, char, int);
|
||||
BanList *ban_is_on_channel(register char *, register ChannelList *);
|
||||
|
||||
@@ -4902,7 +4902,7 @@ void check_server_connect(int server)
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *country(char *hostname)
|
||||
const char *country(const char *hostname)
|
||||
{
|
||||
#ifndef BITCHX_LITE
|
||||
static const struct {
|
||||
@@ -5181,10 +5181,12 @@ static const struct {
|
||||
{"PRO", "Professional" },
|
||||
{"TEL", "Contact Information" },
|
||||
{"TRAVEL", "Travel Industry" },
|
||||
{"XXX", "Porn" },
|
||||
{NULL, NULL}
|
||||
};
|
||||
char *p;
|
||||
int i = 0;
|
||||
const char *p;
|
||||
int i = 0;
|
||||
|
||||
if (!hostname || !*hostname || isdigit((unsigned char)hostname[strlen(hostname)-1]))
|
||||
return "unknown";
|
||||
if ((p = strrchr(hostname, '.')))
|
||||
|
||||
Reference in New Issue
Block a user