summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-18 00:30:28 -0300
committershennetsind <ind@henn.et>2013-02-18 00:30:28 -0300
commit7e72f0cee8867837be53cb2119b610b00e9bd587 (patch)
tree22ab404109fb2def22cf0085fcec2bf174210970 /src/char/char.c
parent237d76e7c409251b5fdb9f3eee40ef3fe5dc2b25 (diff)
downloadhercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.gz
hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.bz2
hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.xz
hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.zip
Improvements all over the place
Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95! Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/char/char.c b/src/char/char.c
index e7220aa36..cd1b1da66 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2833,8 +2833,6 @@ int parse_frommap(int fd)
if( RFIFOREST(fd) < 18 )
return 0;
{
- struct auth_node* node;
-
int account_id = RFIFOL(fd,2);
uint32 login_id1 = RFIFOL(fd,6);
uint32 login_id2 = RFIFOL(fd,10);
@@ -2851,6 +2849,8 @@ int parse_frommap(int fd)
}
else
{
+ struct auth_node* node;
+
// create temporary auth entry
CREATE(node, struct auth_node, 1);
node->account_id = account_id;
@@ -2880,7 +2880,6 @@ int parse_frommap(int fd)
return 0;
{
int map_id, map_fd = -1;
- struct online_char_data* data;
struct mmo_charstatus* char_data;
struct mmo_charstatus char_dat;
@@ -2898,6 +2897,7 @@ int parse_frommap(int fd)
session_isActive(map_fd) &&
char_data )
{ //Send the map server the auth of this player.
+ struct online_char_data* data;
struct auth_node* node;
//Update the "last map" as this is where the player must be spawned on the new map server.
@@ -4571,25 +4571,25 @@ int char_config_read(const char* cfgName)
safestrncpy(wisp_server_name, w2, sizeof(wisp_server_name));
}
} else if (strcmpi(w1, "login_ip") == 0) {
- char ip_str[16];
login_ip = host2ip(w2);
if (login_ip) {
+ char ip_str[16];
safestrncpy(login_ip_str, w2, sizeof(login_ip_str));
ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str));
}
} else if (strcmpi(w1, "login_port") == 0) {
login_port = atoi(w2);
} else if (strcmpi(w1, "char_ip") == 0) {
- char ip_str[16];
char_ip = host2ip(w2);
- if (char_ip){
+ if (char_ip) {
+ char ip_str[16];
safestrncpy(char_ip_str, w2, sizeof(char_ip_str));
ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(char_ip, ip_str));
}
} else if (strcmpi(w1, "bind_ip") == 0) {
- char ip_str[16];
bind_ip = host2ip(w2);
if (bind_ip) {
+ char ip_str[16];
safestrncpy(bind_ip_str, w2, sizeof(bind_ip_str));
ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str));
}