diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/login.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c index 8d9afa5db..ceb0448e4 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -11,6 +11,7 @@ #include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <netdb.h>
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -1163,14 +1164,18 @@ int mmo_auth(struct mmo_account* account, int fd) { dnsbl_serv=strtok(dnsbl_servs,",");
sprintf(ip_dnsbl,"%s.%s",r_ip,dnsbl_serv);
- if(resolve_hostbyname(ip_dnsbl,NULL,NULL)) {
+// Using directly gethostbyname should be quicker. [Skotlex]
+// if(resolve_hostbyname(ip_dnsbl, NULL, NULL)) {
+ if(gethostbyname(ip_dnsbl)) {
ShowInfo("DNSBL: (%s) Blacklisted. User Kicked.\n",ip);
return 3;
}
while((dnsbl_serv=strtok(dnsbl_servs,","))) {
sprintf(ip_dnsbl,"%s.%s",r_ip,dnsbl_serv);
- if(resolve_hostbyname(ip_dnsbl,NULL,NULL)!=0) {
+// Using directly gethostbyname should be quicker. [Skotlex]
+// if(resolve_hostbyname(ip_dnsbl,NULL,NULL)!=0) {
+ if(gethostbyname(ip_dnsbl)) {
ShowInfo("DNSBL: (%s) Blacklisted. User Kicked.\n",ip);
return 3;
}
|