add lcemp networking + ps3 support
YES I KNOW ITS GARBAGE, THATS WHY ITS NOT ON MAIN ILL FIX IT UP IN FUTURE COMMITS THEN MERGE TO MAIN
This commit is contained in:
@@ -157,6 +157,7 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet)
|
||||
|
||||
//if (true)// 4J removed !server->onlineMode)
|
||||
bool sentDisconnect = false;
|
||||
bool nameTaken = false;
|
||||
|
||||
if( sentDisconnect )
|
||||
{
|
||||
@@ -168,7 +169,29 @@ void PendingConnection::handleLogin(shared_ptr<LoginPacket> packet)
|
||||
}
|
||||
else
|
||||
{
|
||||
handleAcceptedLogin(packet);
|
||||
vector<shared_ptr<ServerPlayer> > &pl = server->getPlayers()->players;
|
||||
|
||||
for (unsigned int i = 0; i < pl.size(); i++)
|
||||
{
|
||||
if (pl[i] != NULL && pl[i]->name == name)
|
||||
{
|
||||
nameTaken = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nameTaken)
|
||||
{
|
||||
app.DebugPrintf("Rejecting duplicate name: %ls\n", name.c_str());
|
||||
|
||||
// to do: replace this with a dedicated duplicate name
|
||||
// message
|
||||
disconnect(DisconnectPacket::eDisconnect_Banned);
|
||||
}
|
||||
else
|
||||
{
|
||||
handleAcceptedLogin(packet);
|
||||
}
|
||||
}
|
||||
//else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user