diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-08-13 17:27:06 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-08-13 17:27:06 +0000 |
commit | 9b8ffb96969ba62de8b8cef17e7c9c86c9f40fb5 (patch) | |
tree | d11ca477745db615b205d10cc0388d013a37e443 /src/connectionhandler.cpp | |
parent | 3061c98bcb8eac4660f3b99182434afcbdd898d8 (diff) | |
download | manaserv-9b8ffb96969ba62de8b8cef17e7c9c86c9f40fb5.tar.gz manaserv-9b8ffb96969ba62de8b8cef17e7c9c86c9f40fb5.tar.bz2 manaserv-9b8ffb96969ba62de8b8cef17e7c9c86c9f40fb5.tar.xz manaserv-9b8ffb96969ba62de8b8cef17e7c9c86c9f40fb5.zip |
Changed character list to a sequence of packets and fixed a db issue.
Diffstat (limited to 'src/connectionhandler.cpp')
-rw-r--r-- | src/connectionhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/connectionhandler.cpp b/src/connectionhandler.cpp index 8b4d7a9f..75bfe06e 100644 --- a/src/connectionhandler.cpp +++ b/src/connectionhandler.cpp @@ -119,8 +119,12 @@ void ConnectionHandler::process() case ENET_EVENT_TYPE_RECEIVE: { + // Convert the client IP address to string + // representation + std::string ipaddr = ip4ToString(event.peer->address.host); + LOG_INFO("A packet of length " << event.packet->dataLength << - " was received from " << event.peer->address.host, 2); + " was received from " << ipaddr, 2); NetComputer *comp = (NetComputer *)event.peer->data; @@ -136,10 +140,6 @@ void ConnectionHandler::process() // If the scripting subsystem didn't hook the message // it will be handled by the default message handler. - // Convert the client IP address to string - // representation - std::string ipaddr = ip4ToString(event.peer->address.host); - // Make sure that the packet is big enough (> short) if (event.packet->dataLength >= 2) { Packet *packet = new Packet((char *)event.packet->data, |