diff --git a/include/misc.h b/include/misc.h index cc3d010..6fe3745 100644 --- a/include/misc.h +++ b/include/misc.h @@ -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 *); diff --git a/source/misc.c b/source/misc.c index 522c933..07680ab 100644 --- a/source/misc.c +++ b/source/misc.c @@ -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, '.')))