From ac6843412fa60d589a5d468ae293a895e55dd149 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 13 Sep 2006 18:51:07 +0000 Subject: - Changed a bit the dnsbl lookup in the login servers to make it faster. - Moved the pc rate modifiers from items (hp/sp/matk/hit/flee/cri/flee2/def2/mdef2/def/def2/speed) from status_calc_bl_sub_pc to status_calc_pc, as it simplifies code vastly, and also fixes Osiris card not applying to said bonuses. - Fixed pc_damage_delay_rate not working, thanks to Orn. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8736 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/login/login.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/login/login.c') 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 #include #include +#include #endif #include #include @@ -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; } -- cgit v1.2.3-70-g09d2