diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-13 18:51:07 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-13 18:51:07 +0000 |
commit | ac6843412fa60d589a5d468ae293a895e55dd149 (patch) | |
tree | 2d5d63354a5d257753712b7bd9e4c883e60d3f9b /src/login/login.c | |
parent | ee9d44305dd2eb9283bfdf0b7ee8a9ffd08f620a (diff) | |
download | hercules-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/login.c')
-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;
}
|