summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/char_select.cpp14
-rw-r--r--src/gui/char_server.cpp5
-rw-r--r--src/gui/login.cpp14
3 files changed, 16 insertions, 17 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 76a2d01d..1a109836 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -144,10 +144,11 @@ void server_char_select() {
WFIFOSET(3);
while((in_size<3)||(out_size>0))flush();
- log_hex("Char_Select_Packet", "Packet_ID", RFIFOW(0));
- log_int("Char_Select_Packet", "Packet_length", get_length(RFIFOW(0)));
- log_int("Char_Select_Packet", "Packet_in_size", RFIFOW(2));
- log_int("Char_Select_Packet", "In_size", in_size);
+ log("CharSelect", "Packet ID: %x, Length: %d, Packet_in_size %d",
+ RFIFOW(0),
+ get_length(RFIFOW(0)),
+ RFIFOW(2));
+ log("CharSelect", "In_size: %d", in_size);
if(RFIFOW(0)==0x0071) {
while(in_size<28)flush();
@@ -158,9 +159,8 @@ void server_char_select() {
map_port = RFIFOW(26);
state = GAME;
- log("Player", "map", map_name);
- log("Char_Select_packet", "server_address", iptostring(map_address));
- log_int("Char_Select_packet", "server_port", map_port);
+ log("CharSelect", "Map: %s", map_name);
+ log("CharSelect", "Server: %s:%d", iptostring(map_address), map_port);
RFIFOSKIP(28);
close_session();
} else if(RFIFOW(0)==0x006c) {
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index a90c3d90..7217abd8 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -118,9 +118,8 @@ void server_char_server() {
}
state = CHAR_SELECT;
- log("Player", "name", char_info->name);
- log_hex("Char_Server_Packet", "Packet_ID", RFIFOW(0));
- log_int("Char_Server_Packet", "Packet_length", RFIFOW(2));
+ log("CharServer", "Player: %s (Packet ID: %x, Length: %d",
+ char_info->name, RFIFOW(0), RFIFOW(2));
RFIFOSKIP(RFIFOW(2));
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 6e619757..342ea3dd 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -62,7 +62,7 @@ DIALOG login_dialog[] = {
if(!username)strcpy(username, "player\0");
set_config_string("login", "username", username);
} else set_config_string("login", "username", "player\0");
- log("Player", "username", username);
+ log("Network", "Username is %s", username);
gui_exit = shutdown_dialog(player);
if((gui_exit==5)||(key[KEY_ENTER])) {
if(username[0]=='\0') {
@@ -101,8 +101,8 @@ void server_login() {
WFIFOSET(55);
while((in_size<23)||(out_size>0))flush();
- log_hex("Login_Packet", "Packet_ID", RFIFOW(0));
- log_int("Login_Packet", "Packet_length", get_packet_length(RFIFOW(0)));
+ log("Network", "Packet ID: %x", RFIFOW(0));
+ log("Network", "Packet length: %d", get_packet_length(RFIFOW(0)));
if(RFIFOW(0)==0x0069) {
while(in_size<RFIFOW(2))flush();
@@ -119,10 +119,10 @@ void server_login() {
server_info[i].port = RFIFOW(47+32*i+4);
state = CHAR_SERVER;
}
- log("Login_Packet", "server_address", iptostring(server_info[0].address));
- log("Login_Packet", "server_name", server_info[0].name);
- log_int("Login_Packet", "server_users", server_info[0].online_users);
- log_int("Login_Packet", "server_port", server_info[0].port);
+ log("Network", "Server: %s (%s:%d)", server_info[0].name,
+ iptostring(server_info[0].address),
+ server_info[0].port);
+ log("Network", "Users: %d", server_info[0].online_users);
RFIFOSKIP(RFIFOW(2));
} else if(RFIFOW(0)==0x006a) {
switch(RFIFOB(2)) {