summaryrefslogtreecommitdiff
path: root/src/login_sql
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-13 18:51:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-13 18:51:07 +0000
commitac6843412fa60d589a5d468ae293a895e55dd149 (patch)
tree2d5d63354a5d257753712b7bd9e4c883e60d3f9b /src/login_sql
parentee9d44305dd2eb9283bfdf0b7ee8a9ffd08f620a (diff)
downloadhercules-ac6843412fa60d589a5d468ae293a895e55dd149.tar.gz
hercules-ac6843412fa60d589a5d468ae293a895e55dd149.tar.bz2
hercules-ac6843412fa60d589a5d468ae293a895e55dd149.tar.xz
hercules-ac6843412fa60d589a5d468ae293a895e55dd149.zip
- 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
Diffstat (limited to 'src/login_sql')
-rw-r--r--src/login_sql/login.c9
1 files changed, 7 insertions, 2 deletions
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 <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <netdb.h>
#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;
}