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_sql/login.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/login_sql/login.c') diff --git a/src/login_sql/login.c b/src/login_sql/login.c index 477e6c45a..5961e94a3 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -14,6 +14,7 @@ #include #include #include +#include #endif #endif @@ -589,14 +590,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,","))!=NULL) { 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; } -- cgit v1.2.3-70-g09d2