opentibia / server

An open source server for the MMORPG Tibia.
GNU General Public License v2.0
414 stars 149 forks source link

Login problems #33

Closed arsonox closed 10 years ago

arsonox commented 10 years ago

This piece of code in protocollogin.cpp (line 158) does not quite work as desired:

 if (clientip == getIP() && character.world_id ==
                    (uint16_t)g_config.getNumber(ConfigManager::WORLD_ID))

clientip is set to getConnection()->getIP() and the function getIP() does the exact same thing. So if the world ID of the character matches the world ID of the (current) login server, this if statement is always true.

iryont commented 10 years ago

That's correct. However, I'm not sure if we have getIP() function in the server itself (after all we can bind to several available IPs).

This part of code should be removed for the time being.